public class UnpickV2Remapper extends java.lang.Object implements UnpickV2Reader.Visitor
| Constructor and Description |
|---|
UnpickV2Remapper(java.util.Map<java.lang.String,java.lang.String> classMappings,
java.util.Map<MethodKey,java.lang.String> methodMappings,
UnpickV2Reader.Visitor delegate)
Creates a new
UnpickV2Remapper. |
| Modifier and Type | Method and Description |
|---|---|
void |
endVisit()
Visits the end of the file.
|
void |
startVisit()
Visits the start of the file.
|
void |
visitFlagConstantDefinition(java.lang.String group,
java.lang.String owner,
java.lang.String name,
java.lang.String value,
java.lang.String descriptor)
Visits a flag constant definition (start token
flag).value and descriptor will either both have a value or both be null. |
void |
visitLineNumber(int lineNumber)
Visits the line number.
|
void |
visitSimpleConstantDefinition(java.lang.String group,
java.lang.String owner,
java.lang.String name,
java.lang.String value,
java.lang.String descriptor)
Visits a simple constant definition (start token
constant).value and descriptor will either both have a value or both be null. |
UnpickV2Reader.TargetMethodDefinitionVisitor |
visitTargetMethodDefinition(java.lang.String owner,
java.lang.String name,
java.lang.String descriptor)
Visits a target method definition (start token
target_method). |
public UnpickV2Remapper(java.util.Map<java.lang.String,java.lang.String> classMappings,
java.util.Map<MethodKey,java.lang.String> methodMappings,
UnpickV2Reader.Visitor delegate)
UnpickV2Remapper.classMappings - a mapping of old class names to new class names.methodMappings - a mapping of old method names, owner classes, and descriptors; to new method names.delegate - the visitor that should visit the remapped target method definitions.
All other visitor methods only delegate to the delegate visitor.public UnpickV2Reader.TargetMethodDefinitionVisitor visitTargetMethodDefinition(java.lang.String owner, java.lang.String name, java.lang.String descriptor)
UnpickV2Reader.Visitortarget_method).visitTargetMethodDefinition in interface UnpickV2Reader.Visitorowner - the internal name of the method's owner class.name - the method's Java identifier.descriptor - the method's descriptor.TargetMethodDefinitionVisitor that should visit the parameter and return groups of the
target method definition, or null if they should not be visited.public void startVisit()
UnpickV2Reader.VisitorstartVisit in interface UnpickV2Reader.Visitorpublic void visitLineNumber(int lineNumber)
UnpickV2Reader.VisitorvisitLineNumber in interface UnpickV2Reader.VisitorlineNumber - the number of the line that is about to be visited.public void visitSimpleConstantDefinition(java.lang.String group,
java.lang.String owner,
java.lang.String name,
java.lang.String value,
java.lang.String descriptor)
UnpickV2Reader.Visitorconstant).value and descriptor will either both have a value or both be null.visitSimpleConstantDefinition in interface UnpickV2Reader.Visitorgroup - the id of the constant's constant group.owner - the internal name of the constant's owner class.name - the constant's Java identifier.value - the constant's value as a String, or null if it is not specified (will be resolved at runtime).descriptor - the constant's descriptor, or null if it is not specified (will be resolved at runtime).public void visitFlagConstantDefinition(java.lang.String group,
java.lang.String owner,
java.lang.String name,
java.lang.String value,
java.lang.String descriptor)
UnpickV2Reader.Visitorflag).value and descriptor will either both have a value or both be null.visitFlagConstantDefinition in interface UnpickV2Reader.Visitorgroup - the id of the constant's constant group.owner - the internal name of the constant's owner class.name - the constant's Java identifier.value - the constant's value as a String, or null if it is not specified (will be resolved at runtime).descriptor - the constant's descriptor, or null if it is not specified (will be resolved at runtime).public void endVisit()
UnpickV2Reader.VisitorendVisit in interface UnpickV2Reader.Visitor