public abstract class UnpickV3Remapper extends ForwardingUnpickV3Visitor
Remaps all class, field, and method names in a .unpick v3 file. Visitor methods will be called on the downstream visitor with the remapped names. All class names use "." format, not "/" format.
  • Constructor Details

  • Method Details

    • visitGroupDefinition

      public void visitGroupDefinition(GroupDefinition groupDefinition)
      Overrides:
      visitGroupDefinition in class ForwardingUnpickV3Visitor
    • visitTargetField

      public void visitTargetField(TargetField targetField)
      Overrides:
      visitTargetField in class ForwardingUnpickV3Visitor
    • visitTargetMethod

      public void visitTargetMethod(TargetMethod targetMethod)
      Overrides:
      visitTargetMethod in class ForwardingUnpickV3Visitor
    • visitTargetAnnotation

      public void visitTargetAnnotation(TargetAnnotation targetAnnotation)
      Overrides:
      visitTargetAnnotation in class ForwardingUnpickV3Visitor
    • mapClassName

      protected abstract String mapClassName(String className)
      Maps a class name. The input class name uses "." format not "/" format, and so should the output class name.
    • mapFieldName

      protected abstract String mapFieldName(String className, String fieldName, String fieldDesc)
      Maps a field name. The input class name uses "." format not "/" format. The descriptor is as normal (using "/" for class names).
    • mapMethodName

      protected abstract String mapMethodName(String className, String methodName, String methodDesc)
      Maps a method name. The input class name uses "." format not "/" format. The descriptor is as normal (using "/" for class names).
    • getClassesInPackage

      protected abstract List<String> getClassesInPackage(String pkg)
      Returns a list of all unmapped classes in the given unmapped package. The package name uses "." format not "/" format, and so should the output class names. The output class names should be fully qualified. Classes in subpackages are not considered as inside the parent package for the purposes of this method. That is, if the class foo.bar.Baz exists, then getClassesInPackage("foo.bar") should return that class, but getClassesInPackage("foo") should not.
    • getFieldDesc

      protected abstract String getFieldDesc(String className, String fieldName)
      Gets the descriptor of a field given only its name and owner. The input class name uses "." format not "/" format. The returned descriptor is as normal (using "/" for class names).