Package com.tonic.renamer.descriptor
Class SignatureRemapper
- java.lang.Object
-
- com.tonic.renamer.descriptor.SignatureRemapper
-
public class SignatureRemapper extends Object
Remaps class references within generic signatures.
-
-
Constructor Summary
Constructors Constructor Description SignatureRemapper(Function<String,String> classMapper)Creates a remapper with the given class name mapping function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanneedsRemapping(String signature)Checks if a signature contains any class references that would be remapped.Stringremap(String signature)Remaps all class references in a generic signature.
-
-
-
Method Detail
-
remap
public String remap(String signature)
Remaps all class references in a generic signature.- Parameters:
signature- The generic signature- Returns:
- The remapped signature, or null if signature was null
-
needsRemapping
public boolean needsRemapping(String signature)
Checks if a signature contains any class references that would be remapped.- Parameters:
signature- The signature to check- Returns:
- true if the signature would change after remapping
-
-