Package proguard.classfile.util
Class MemberFinder
- java.lang.Object
- 
- proguard.classfile.util.MemberFinder
 
- 
- All Implemented Interfaces:
- MemberVisitor
 
 public class MemberFinder extends java.lang.Object implements MemberVisitor This utility class provides methods to find class members in a given class or in its hierarchy.
- 
- 
Constructor SummaryConstructors Constructor Description MemberFinder()Creates a new MemberFinder that looks in the class hierarchy.MemberFinder(boolean searchHierarchy)Creates a new MemberFinder that looks in the class hierarchy if specified.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ClazzcorrespondingClass()Returns the corresponding class of the most recently found class member.FieldfindField(Clazz clazz, java.lang.String name, java.lang.String descriptor)Finds the field with the given name and descriptor in the given class or its hierarchy.FieldfindField(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor)Finds the field with the given name and descriptor in the given class or its hierarchy.MemberfindMember(Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField)Finds the class member with the given name and descriptor in the given class or its hierarchy.MemberfindMember(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField)Finds the class member with the given name and descriptor in the given class or its hierarchy, referenced from the optional given class.MethodfindMethod(Clazz clazz, java.lang.String name, java.lang.String descriptor)Finds the method with the given name and descriptor in the given class or its hierarchy.MethodfindMethod(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor)Finds the method with the given name and descriptor in the given class or its hierarchy.booleanisOverriden(Clazz clazz, Method method)Returns whether the given method is overridden anywhere down the class hierarchy.booleanisShadowed(Clazz clazz, Field field)Returns whether the given field is shadowed anywhere down the class hierarchy.voidvisitAnyMember(Clazz clazz, Member member)Visits any Member instance.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface proguard.classfile.visitor.MemberVisitorvisitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramField, visitProgramMember, visitProgramMethod
 
- 
 
- 
- 
- 
Method Detail- 
findFieldpublic Field findField(Clazz clazz, java.lang.String name, java.lang.String descriptor) Finds the field with the given name and descriptor in the given class or its hierarchy. The name and descriptor may contain wildcards.
 - 
findFieldpublic Field findField(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor) Finds the field with the given name and descriptor in the given class or its hierarchy. The name and descriptor may contain wildcards.
 - 
findMethodpublic Method findMethod(Clazz clazz, java.lang.String name, java.lang.String descriptor) Finds the method with the given name and descriptor in the given class or its hierarchy. The name and descriptor may contain wildcards.
 - 
findMethodpublic Method findMethod(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor) Finds the method with the given name and descriptor in the given class or its hierarchy. The name and descriptor may contain wildcards.
 - 
findMemberpublic Member findMember(Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField) Finds the class member with the given name and descriptor in the given class or its hierarchy. The name and descriptor may contain wildcards.
 - 
findMemberpublic Member findMember(Clazz referencingClass, Clazz clazz, java.lang.String name, java.lang.String descriptor, boolean isField) Finds the class member with the given name and descriptor in the given class or its hierarchy, referenced from the optional given class. The name and descriptor may contain wildcards.
 - 
correspondingClasspublic Clazz correspondingClass() Returns the corresponding class of the most recently found class member.
 - 
isOverridenpublic boolean isOverriden(Clazz clazz, Method method) Returns whether the given method is overridden anywhere down the class hierarchy.
 - 
isShadowedpublic boolean isShadowed(Clazz clazz, Field field) Returns whether the given field is shadowed anywhere down the class hierarchy.
 - 
visitAnyMemberpublic void visitAnyMember(Clazz clazz, Member member) Description copied from interface:MemberVisitorVisits any Member instance. The more specific default implementations of this interface delegate to this method.- Specified by:
- visitAnyMemberin interface- MemberVisitor
 
 
- 
 
-