Class ReferencedClassesExtractor

java.lang.Object
proguard.classfile.visitor.ReferencedClassesExtractor
All Implemented Interfaces:
MemberVisitor

public class ReferencedClassesExtractor extends Object implements MemberVisitor
Divides the referenced classes in a program/library method in the classes referenced in return and parameters.
  • Constructor Details

    • ReferencedClassesExtractor

      public ReferencedClassesExtractor()
  • Method Details

    • visitAnyMember

      public void visitAnyMember(Clazz clazz, Member member)
      Description copied from interface: MemberVisitor
      Visits any Member instance. The more specific default implementations of this interface delegate to this method.
      Specified by:
      visitAnyMember in interface MemberVisitor
    • visitProgramMethod

      public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
      Specified by:
      visitProgramMethod in interface MemberVisitor
    • visitLibraryMethod

      public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
      Specified by:
      visitLibraryMethod in interface MemberVisitor
    • getReturnClass

      @Nullable public @Nullable Clazz getReturnClass()
      Returns the referenced return Clazz of the target method.
      Returns:
      The instance referenced class. Null if the return type is a primitive or array of primitives. Can be null if the class pools have not been initialized; even if they have, the clazz not being null is not a guarantee.
    • getParameterClasses

      public Clazz[] getParameterClasses()
      Returns the referenced Clazz for each parameter.
      Returns:
      The referenced class for each parameter (instance excluded), where each parameter can be accessed given its position (starting from 0, category 2 values take only one slot). An element is null if the corresponding parameter is of a primitive type or an array of primitives. An element can be null if the class pools have not been initialized; even if they have, elements not being null is not a guarantee