Interface UnpickV2Reader.Visitor
- All Known Implementing Classes:
UnpickV2Remapper,UnpickV2Writer
- Enclosing class:
UnpickV2Reader
public static interface UnpickV2Reader.Visitor
A visitor for visiting the structure of .unpick v2 format text.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidendVisit()Visits the end of the file.default voidVisits the start of the file.default voidvisitFlagConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a flag constant definition (start tokenflag).
valueanddescriptorwill either both have a value or both be null.default voidvisitLineNumber(int lineNumber) Visits the line number.default voidvisitSimpleConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a simple constant definition (start tokenconstant).
valueanddescriptorwill either both have a value or both be null.visitTargetMethodDefinition(String owner, String name, String descriptor) Visits a target method definition (start tokentarget_method).
-
Method Details
-
startVisit
default void startVisit()Visits the start of the file. This is the first method called. -
visitLineNumber
default void visitLineNumber(int lineNumber) Visits the line number.- Parameters:
lineNumber- the number of the line that is about to be visited.
-
visitSimpleConstantDefinition
default void visitSimpleConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a simple constant definition (start tokenconstant).
valueanddescriptorwill either both have a value or both be null.- Parameters:
group- 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 aString, 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).
-
visitFlagConstantDefinition
default void visitFlagConstantDefinition(String group, String owner, String name, String value, String descriptor) Visits a flag constant definition (start tokenflag).
valueanddescriptorwill either both have a value or both be null.- Parameters:
group- 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 aString, 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).
-
visitTargetMethodDefinition
default UnpickV2Reader.TargetMethodDefinitionVisitor visitTargetMethodDefinition(String owner, String name, String descriptor) Visits a target method definition (start tokentarget_method).- Parameters:
owner- the internal name of the method's owner class.name- the method's Java identifier.descriptor- the method's descriptor.- Returns:
- an instance of
TargetMethodDefinitionVisitorthat should visit the parameter and return groups of the target method definition, or null if they should not be visited.
-
endVisit
default void endVisit()Visits the end of the file. This is the last method called.
-