Package proguard.util
Class PrefixRemovingStringFunction
- java.lang.Object
-
- proguard.util.PrefixRemovingStringFunction
-
- All Implemented Interfaces:
StringFunction
public class PrefixRemovingStringFunction extends java.lang.Object implements StringFunction
ThisStringFunction
removes a given prefix from each transformed String, if present.
-
-
Field Summary
-
Fields inherited from interface proguard.util.StringFunction
IDENTITY_FUNCTION
-
-
Constructor Summary
Constructors Constructor Description PrefixRemovingStringFunction(java.lang.String prefix)
Creates a new PrefixRemovingStringFunction.PrefixRemovingStringFunction(java.lang.String prefix, StringFunction stringFunction)
Creates a new PrefixRemovingStringFunction.PrefixRemovingStringFunction(java.lang.String prefix, StringFunction successStringFunction, StringFunction failStringFunction)
Creates a new PrefixRemovingStringFunction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
transform(java.lang.String string)
Transforms the given string into a new string.
-
-
-
Constructor Detail
-
PrefixRemovingStringFunction
public PrefixRemovingStringFunction(java.lang.String prefix)
Creates a new PrefixRemovingStringFunction.- Parameters:
prefix
- the prefix to remove from each string.
-
PrefixRemovingStringFunction
public PrefixRemovingStringFunction(java.lang.String prefix, StringFunction stringFunction)
Creates a new PrefixRemovingStringFunction.- Parameters:
prefix
- the prefix to remove from each string.stringFunction
- the function to subsequently apply to all strings.
-
PrefixRemovingStringFunction
public PrefixRemovingStringFunction(java.lang.String prefix, StringFunction successStringFunction, StringFunction failStringFunction)
Creates a new PrefixRemovingStringFunction.- Parameters:
prefix
- the prefix to remove from each string.successStringFunction
- the function to subsequently apply to prefixed strings.failStringFunction
- the function to subsequently apply to other strings.
-
-
Method Detail
-
transform
public java.lang.String transform(java.lang.String string)
Description copied from interface:StringFunction
Transforms the given string into a new string.- Specified by:
transform
in interfaceStringFunction
-
-