Package proguard.classfile.visitor
Class ReferencedClassesExtractor
- java.lang.Object
-
- proguard.classfile.visitor.ReferencedClassesExtractor
-
- All Implemented Interfaces:
MemberVisitor
public class ReferencedClassesExtractor extends java.lang.Object implements MemberVisitor
Divides the referenced classes in a program/library method in the classes referenced in return and parameters.
-
-
Constructor Summary
Constructors Constructor Description ReferencedClassesExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Clazz[]
getParameterClasses()
Returns the referencedClazz
for each parameter.@Nullable Clazz
getReturnClass()
Returns the referenced returnClazz
of the target method.void
visitAnyMember(Clazz clazz, Member member)
Visits any Member instance.void
visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
void
visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.visitor.MemberVisitor
visitLibraryField, visitLibraryMember, visitProgramField, visitProgramMember
-
-
-
-
Method Detail
-
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 interfaceMemberVisitor
-
visitProgramMethod
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
- Specified by:
visitProgramMethod
in interfaceMemberVisitor
-
visitLibraryMethod
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
- Specified by:
visitLibraryMethod
in interfaceMemberVisitor
-
getReturnClass
@Nullable public @Nullable Clazz getReturnClass()
Returns the referenced returnClazz
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 referencedClazz
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
-
-