public abstract class SimpleAbstractConstantMapper extends java.lang.Object implements IConstantMapper
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,ReplacementInstructionGenerator> |
constantGroups |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleAbstractConstantMapper(java.util.Map<java.lang.String,ReplacementInstructionGenerator> constantGroups) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract TargetMethods |
getTargetMethods() |
void |
mapParameter(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
int parameterIndex,
ReplacementInstructionGenerator.Context context)
Maps an inlined parameter value to replacement instructions, for a given target method.
|
void |
mapReturn(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
ReplacementInstructionGenerator.Context context)
Maps an inlined return value to replacement instructions, for a given target method.
|
boolean |
targets(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor) |
boolean |
targetsParameter(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
int parameterIndex) |
boolean |
targetsReturn(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor) |
protected final java.util.Map<java.lang.String,ReplacementInstructionGenerator> constantGroups
protected SimpleAbstractConstantMapper(java.util.Map<java.lang.String,ReplacementInstructionGenerator> constantGroups)
protected abstract TargetMethods getTargetMethods()
public boolean targets(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor)
targets in interface IConstantMappermethodOwner - the internal name of the class that owns the method.methodName - the name of the method.methodDescriptor - the descriptor of the method.public boolean targetsParameter(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
int parameterIndex)
targetsParameter in interface IConstantMappermethodOwner - the internal name of the class that owns the method.methodName - the name of the method.methodDescriptor - the descriptor of the method.parameterIndex - the index of the parameter being checkedparameterIndex.public void mapParameter(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
int parameterIndex,
ReplacementInstructionGenerator.Context context)
IConstantMappermapParameter in interface IConstantMappermethodOwner - the internal name of the class that owns the target method.methodName - the name of the target method.methodDescriptor - the descriptor of the target method.parameterIndex - the index of the parameter of the target method that value is passed to.context - the context of the replacementpublic boolean targetsReturn(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor)
targetsReturn in interface IConstantMappermethodOwner - the internal name of the class that owns the method.methodName - the name of the method.methodDescriptor - the descriptor of the method.public void mapReturn(java.lang.String methodOwner,
java.lang.String methodName,
java.lang.String methodDescriptor,
ReplacementInstructionGenerator.Context context)
IConstantMappermapReturn in interface IConstantMappermethodOwner - the internal name of the class that owns the target method.methodName - the name of the target method.methodDescriptor - the descriptor of the target method.context - the context of the replacement.