|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.classfile.LibraryClass
public class LibraryClass
This Clazz is a compact representation of the essential data in a Java class.
| Field Summary | |
|---|---|
LibraryField[] |
fields
|
Clazz[] |
interfaceClasses
An extra field pointing to the interfaces of this class. |
java.lang.String[] |
interfaceNames
|
LibraryMethod[] |
methods
|
Clazz[] |
subClasses
An extra field pointing to the subclasses of this class. |
Clazz |
superClass
An extra field pointing to the superclass of this class. |
java.lang.String |
superClassName
|
java.lang.String |
thisClassName
|
int |
u2accessFlags
|
java.lang.Object |
visitorInfo
An extra field in which visitors can store information. |
| Constructor Summary | |
|---|---|
LibraryClass()
Creates an empty LibraryClass. |
|
| Method Summary | |
|---|---|
void |
accept(ClassVisitor classVisitor)
Accepts the given class visitor. |
void |
addSubClass(Clazz clazz)
Notifies this Clazz that it is being subclassed by another class. |
void |
attributesAccept(AttributeVisitor attributeVisitor)
Lets the given attribute info visitor visit all attributes of this class. |
void |
constantPoolEntriesAccept(ConstantVisitor constantVisitor)
Lets the given constant pool entry visitor visit all constant pool entries of this class. |
void |
constantPoolEntryAccept(int index,
ConstantVisitor constantVisitor)
Lets the given constant pool entry visitor visit the constant pool entry at the specified index. |
boolean |
extends_(Clazz clazz)
Returns whether this class extends the given class. |
boolean |
extendsOrImplements(Clazz clazz)
Returns whether this class implements the given class. |
void |
fieldAccept(java.lang.String name,
java.lang.String descriptor,
MemberVisitor memberVisitor)
Lets the given member info visitor visit the specified field. |
void |
fieldsAccept(MemberVisitor memberVisitor)
Lets the given member info visitor visit all fields of this class. |
Field |
findField(java.lang.String name,
java.lang.String descriptor)
Returns the field with the given name and descriptor. |
Method |
findMethod(java.lang.String name,
java.lang.String descriptor)
Returns the method with the given name and descriptor. |
int |
getAccessFlags()
Returns the access flags of this class. |
java.lang.String |
getClassName(int constantIndex)
Returns the class name of ClassConstant at the specified index. |
Clazz |
getInterface(int index)
Returns the interface at the given index. |
int |
getInterfaceCount()
Returns the number of interfaces that this class implements. |
java.lang.String |
getInterfaceName(int index)
Returns the full internal name of the interface at the given index of this class. |
java.lang.String |
getName()
Returns the full internal name of this class. |
java.lang.String |
getName(int constantIndex)
Returns the name of the NameAndTypeConstant at the specified index. |
java.lang.String |
getString(int constantIndex)
Returns the String value of the Utf8Constant at the specified index. |
java.lang.String |
getStringString(int constantIndex)
Returns the String value of the StringConstant at the specified index. |
Clazz |
getSuperClass()
Returns the super class of this class. |
java.lang.String |
getSuperName()
Returns the full internal name of the super class of this class, or null if this class represents java.lang.Object. |
int |
getTag(int constantIndex)
Returns the tag value of the Constant at the specified index. |
java.lang.String |
getType(int constantIndex)
Returns the type of the NameAndTypeConstant at the specified index. |
java.lang.Object |
getVisitorInfo()
Gets the visitor information of the visitor accepter. |
void |
hierarchyAccept(boolean visitThisClass,
boolean visitSuperClass,
boolean visitInterfaces,
boolean visitSubclasses,
ClassVisitor classVisitor)
Accepts the given class visitor in the class hierarchy. |
boolean |
mayHaveImplementations(Method method)
Returns whether the given method may possibly have implementing or overriding methods down the class hierarchy. |
void |
methodAccept(java.lang.String name,
java.lang.String descriptor,
MemberVisitor memberVisitor)
Lets the given member info visitor visit the specified method. |
void |
methodImplementationsAccept(Method method,
boolean visitThisMethod,
MemberVisitor memberVisitor)
Lets the given member info visitor visit all concrete implementations of the specified method in the class hierarchy. |
void |
methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
boolean visitThisMethod,
boolean visitSpecialMethods,
boolean visitSuperMethods,
boolean visitOverridingMethods,
MemberVisitor memberVisitor)
Lets the given member info visitor visit all concrete implementations of the specified method in the class hierarchy. |
void |
methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
boolean visitThisMethod,
MemberVisitor memberVisitor)
Lets the given member info visitor visit all concrete implementations of the specified method in the class hierarchy. |
void |
methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
Method method,
boolean visitThisMethod,
boolean visitSpecialMethods,
boolean visitSuperMethods,
boolean visitOverridingMethods,
MemberVisitor memberVisitor)
Lets the given member info visitor visit all concrete implementations of the specified method in the class hierarchy. |
void |
methodsAccept(MemberVisitor memberVisitor)
Lets the given member info visitor visit all methods of this class. |
void |
setVisitorInfo(java.lang.Object visitorInfo)
Sets the visitor information of the visitor accepter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int u2accessFlags
public java.lang.String thisClassName
public java.lang.String superClassName
public java.lang.String[] interfaceNames
public LibraryField[] fields
public LibraryMethod[] methods
public Clazz superClass
ClassSuperHierarchyInitializer.
public Clazz[] interfaceClasses
ClassSuperHierarchyInitializer.
public Clazz[] subClasses
ClassSubHierarchyInitializer.
public java.lang.Object visitorInfo
| Constructor Detail |
|---|
public LibraryClass()
| Method Detail |
|---|
public int getAccessFlags()
Clazz
getAccessFlags in interface ClazzClassConstantspublic java.lang.String getName()
Clazz
getName in interface Clazzpublic java.lang.String getSuperName()
Clazz
getSuperName in interface Clazzpublic int getInterfaceCount()
Clazz
getInterfaceCount in interface Clazzpublic java.lang.String getInterfaceName(int index)
Clazz
getInterfaceName in interface Clazzpublic int getTag(int constantIndex)
Clazz
getTag in interface Clazzpublic java.lang.String getString(int constantIndex)
Clazz
getString in interface Clazzpublic java.lang.String getStringString(int constantIndex)
Clazz
getStringString in interface Clazzpublic java.lang.String getClassName(int constantIndex)
Clazz
getClassName in interface Clazzpublic java.lang.String getName(int constantIndex)
Clazz
getName in interface Clazzpublic java.lang.String getType(int constantIndex)
Clazz
getType in interface Clazzpublic void addSubClass(Clazz clazz)
Clazz
addSubClass in interface Clazzpublic Clazz getSuperClass()
Clazz
getSuperClass in interface Clazzpublic Clazz getInterface(int index)
Clazz
getInterface in interface Clazzpublic boolean extends_(Clazz clazz)
Clazz
extends_ in interface Clazzpublic boolean extendsOrImplements(Clazz clazz)
Clazz
extendsOrImplements in interface Clazz
public Field findField(java.lang.String name,
java.lang.String descriptor)
Clazz
findField in interface Clazz
public Method findMethod(java.lang.String name,
java.lang.String descriptor)
Clazz
findMethod in interface Clazzpublic void accept(ClassVisitor classVisitor)
Clazz
accept in interface Clazz
public void hierarchyAccept(boolean visitThisClass,
boolean visitSuperClass,
boolean visitInterfaces,
boolean visitSubclasses,
ClassVisitor classVisitor)
Clazz
hierarchyAccept in interface ClazzvisitThisClass - specifies whether to visit this class.visitSuperClass - specifies whether to visit the super classes.visitInterfaces - specifies whether to visit the interfaces.visitSubclasses - specifies whether to visit the subclasses.classVisitor - the ClassVisitor that will
visit the class hierarchy.public void constantPoolEntriesAccept(ConstantVisitor constantVisitor)
Clazz
constantPoolEntriesAccept in interface Clazz
public void constantPoolEntryAccept(int index,
ConstantVisitor constantVisitor)
Clazz
constantPoolEntryAccept in interface Clazzpublic void fieldsAccept(MemberVisitor memberVisitor)
Clazz
fieldsAccept in interface Clazz
public void fieldAccept(java.lang.String name,
java.lang.String descriptor,
MemberVisitor memberVisitor)
Clazz
fieldAccept in interface Clazzpublic void methodsAccept(MemberVisitor memberVisitor)
Clazz
methodsAccept in interface Clazz
public void methodAccept(java.lang.String name,
java.lang.String descriptor,
MemberVisitor memberVisitor)
Clazz
methodAccept in interface Clazzpublic boolean mayHaveImplementations(Method method)
Clazz
mayHaveImplementations in interface Clazzmethod - the method that may have implementations.
public void methodImplementationsAccept(Method method,
boolean visitThisMethod,
MemberVisitor memberVisitor)
Clazz
methodImplementationsAccept in interface Clazzmethod - the method that may have concrete implementations.visitThisMethod - specifies whether to visit the method in
this class.memberVisitor - the MemberVisitor that will
visit the method hierarchy.
public void methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
boolean visitThisMethod,
MemberVisitor memberVisitor)
Clazz
methodImplementationsAccept in interface Clazzname - the method name.descriptor - the method descriptor.visitThisMethod - specifies whether to visit the method in
this class.memberVisitor - the MemberVisitor that will
visit the method hierarchy.
public void methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
boolean visitThisMethod,
boolean visitSpecialMethods,
boolean visitSuperMethods,
boolean visitOverridingMethods,
MemberVisitor memberVisitor)
Clazz
methodImplementationsAccept in interface Clazzname - the method name.descriptor - the method descriptor.visitThisMethod - specifies whether to visit the method in
this class.visitSpecialMethods - specifies whether to visit the special
initializer methods.visitSuperMethods - specifies whether to visit the method in
the super classes.visitOverridingMethods - specifies whether to visit the method in
the subclasses.memberVisitor - the MemberVisitor that
will visit the method hierarchy.
public void methodImplementationsAccept(java.lang.String name,
java.lang.String descriptor,
Method method,
boolean visitThisMethod,
boolean visitSpecialMethods,
boolean visitSuperMethods,
boolean visitOverridingMethods,
MemberVisitor memberVisitor)
Clazz
methodImplementationsAccept in interface Clazzname - the method name.descriptor - the method descriptor.method - the method itself, if present.visitThisMethod - specifies whether to visit the method in
this class.visitSpecialMethods - specifies whether to visit the method in
the super classes.visitSuperMethods - specifies whether to visit the method in
the subclasses.visitOverridingMethods - specifies whether to visit the method in
the interfaces.memberVisitor - the MemberVisitor that
will visit the method hierarchy.public void attributesAccept(AttributeVisitor attributeVisitor)
Clazz
attributesAccept in interface Clazzpublic java.lang.Object getVisitorInfo()
VisitorAccepter
getVisitorInfo in interface VisitorAccepterpublic void setVisitorInfo(java.lang.Object visitorInfo)
VisitorAccepter
setVisitorInfo in interface VisitorAccepter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||