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 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 token constant).
      value and descriptor will 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 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).
    • visitFlagConstantDefinition

      default void visitFlagConstantDefinition(String group, String owner, String name, String value, String descriptor)
      Visits a flag constant definition (start token flag).
      value and descriptor will 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 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).
    • visitTargetMethodDefinition

      default UnpickV2Reader.TargetMethodDefinitionVisitor visitTargetMethodDefinition(String owner, String name, String descriptor)
      Visits a target method definition (start token target_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 TargetMethodDefinitionVisitor that 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.