|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectproguard.classfile.LibraryClassFile
This is a compact representation of the essential data in a Java class file. A LibraryClassFile instance representing a *.class file can be generated using the static create(DataInput) method, but not persisted back.
| Field Summary | |
LibraryFieldInfo[] |
fields
|
ClassFile[] |
interfaceClasses
An extra field pointing to the interfaces of this class. |
String[] |
interfaceNames
|
LibraryMethodInfo[] |
methods
|
ClassFile[] |
subClasses
An extra field pointing to the subclasses of this class. |
ClassFile |
superClass
An extra field pointing to the superclass of this class. |
String |
superClassName
|
String |
thisClassName
|
int |
u2accessFlags
|
Object |
visitorInfo
An extra field in which visitors can store information. |
| Method Summary | |
void |
accept(ClassFileVisitor classFileVisitor)
Accepts the given class file visitor. |
void |
addSubClass(ClassFile classFile)
Notifies this ClassFile that it is being subclassed by another class. |
void |
attributesAccept(AttrInfoVisitor attrInfoVisitor)
Lets the given attribute info visitor visit all attributes of this class. |
void |
constantPoolEntriesAccept(CpInfoVisitor cpInfoVisitor)
Lets the given constant pool entry visitor visit all constant pool entries of this class. |
void |
constantPoolEntryAccept(CpInfoVisitor cpInfoVisitor,
int index)
Lets the given constant pool entry visitor visit the constant pool entry at the specified index. |
static LibraryClassFile |
create(DataInput din,
boolean skipNonPublic)
Creates a new LibraryClassFile from the class file format data in the DataInput stream. |
boolean |
extends_(ClassFile classFile)
Returns whether this class extends the given class. |
void |
fieldAccept(MemberInfoVisitor memberInfoVisitor,
String name,
String descriptor)
Lets the given member info visitor visit the specified field. |
void |
fieldsAccept(MemberInfoVisitor memberInfoVisitor)
Lets the given member info visitor visit all fields of this class. |
FieldInfo |
findField(String name,
String descriptor)
Returns the field with the given name and descriptor. |
MethodInfo |
findMethod(String name,
String descriptor)
Returns the method with the given name and descriptor. |
int |
getAccessFlags()
Returns the access flags of this class. |
String |
getCpClassNameString(int cpIndex)
Returns the class name of ClassCpEntry at the specified index. |
String |
getCpNameString(int cpIndex)
Returns the name of the NameAndTypeCpEntry at the specified index. |
String |
getCpString(int cpIndex)
Returns the String value of the StringCpEntry at the specified index. |
int |
getCpTag(int cpIndex)
Returns the tag value of the CpEntry at the specified index. |
String |
getCpTypeString(int cpIndex)
Returns the type of the NameAndTypeCpEntry at the specified index. |
ClassFile |
getInterface(int index)
Returns the interface at the given index. |
String |
getInterfaceName(int index)
Returns the full internal name of the interface at the given index of this class. |
String |
getName()
Returns the full internal name of this class. |
ClassFile |
getSuperClass()
Returns the super class of this class. |
String |
getSuperName()
Returns the full internal name of the super class of this class, or null if this class represents java.lang.Object. |
Object |
getVisitorInfo()
Gets the visitor information of the visitor accepter. |
void |
hierarchyAccept(boolean visitThisClass,
boolean visitSuperClass,
boolean visitInterfaces,
boolean visitSubclasses,
ClassFileVisitor classFileVisitor)
Accepts the given class file visitor in the class hierarchy. |
boolean |
implements_(ClassFile classFile)
Returns whether this class implements the given class. |
void |
methodAccept(MemberInfoVisitor memberInfoVisitor,
String name,
String descriptor)
Lets the given member info visitor visit the specified method. |
void |
methodsAccept(MemberInfoVisitor memberInfoVisitor)
Lets the given member info visitor visit all methods of this class. |
void |
setVisitorInfo(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 String thisClassName
public String superClassName
public String[] interfaceNames
public LibraryFieldInfo[] fields
public LibraryMethodInfo[] methods
public ClassFile superClass
ClassFileReferenceInitializer.
public ClassFile[] interfaceClasses
ClassFileReferenceInitializer.
public ClassFile[] subClasses
ClassFileReferenceInitializer.
public Object visitorInfo
| Method Detail |
public static LibraryClassFile create(DataInput din,
boolean skipNonPublic)
throws IOException
null if the
class file is not visible.
IOException - if the class file is corrupt or incompletepublic int getAccessFlags()
ClassFile
getAccessFlags in interface ClassFileClassConstantspublic String getName()
ClassFile
getName in interface ClassFilepublic String getSuperName()
ClassFile
getSuperName in interface ClassFilepublic String getInterfaceName(int index)
ClassFile
getInterfaceName in interface ClassFilepublic int getCpTag(int cpIndex)
ClassFile
getCpTag in interface ClassFilepublic String getCpString(int cpIndex)
ClassFile
getCpString in interface ClassFilepublic String getCpClassNameString(int cpIndex)
ClassFile
getCpClassNameString in interface ClassFilepublic String getCpNameString(int cpIndex)
ClassFile
getCpNameString in interface ClassFilepublic String getCpTypeString(int cpIndex)
ClassFile
getCpTypeString in interface ClassFilepublic void addSubClass(ClassFile classFile)
ClassFile
addSubClass in interface ClassFilepublic ClassFile getSuperClass()
ClassFile
getSuperClass in interface ClassFilepublic ClassFile getInterface(int index)
ClassFile
getInterface in interface ClassFilepublic boolean extends_(ClassFile classFile)
ClassFile
extends_ in interface ClassFilepublic boolean implements_(ClassFile classFile)
ClassFile
implements_ in interface ClassFile
public FieldInfo findField(String name,
String descriptor)
ClassFile
findField in interface ClassFile
public MethodInfo findMethod(String name,
String descriptor)
ClassFile
findMethod in interface ClassFilepublic void accept(ClassFileVisitor classFileVisitor)
ClassFile
accept in interface ClassFile
public void hierarchyAccept(boolean visitThisClass,
boolean visitSuperClass,
boolean visitInterfaces,
boolean visitSubclasses,
ClassFileVisitor classFileVisitor)
ClassFile
hierarchyAccept in interface ClassFilevisitThisClass - 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.classFileVisitor - the ClassFileVisitor that will
visit the class hierarchy.public void constantPoolEntriesAccept(CpInfoVisitor cpInfoVisitor)
ClassFile
constantPoolEntriesAccept in interface ClassFile
public void constantPoolEntryAccept(CpInfoVisitor cpInfoVisitor,
int index)
ClassFile
constantPoolEntryAccept in interface ClassFilepublic void fieldsAccept(MemberInfoVisitor memberInfoVisitor)
ClassFile
fieldsAccept in interface ClassFile
public void fieldAccept(MemberInfoVisitor memberInfoVisitor,
String name,
String descriptor)
ClassFile
fieldAccept in interface ClassFilepublic void methodsAccept(MemberInfoVisitor memberInfoVisitor)
ClassFile
methodsAccept in interface ClassFile
public void methodAccept(MemberInfoVisitor memberInfoVisitor,
String name,
String descriptor)
ClassFile
methodAccept in interface ClassFilepublic void attributesAccept(AttrInfoVisitor attrInfoVisitor)
ClassFile
attributesAccept in interface ClassFilepublic Object getVisitorInfo()
VisitorAccepter
getVisitorInfo in interface VisitorAccepterpublic void setVisitorInfo(Object visitorInfo)
VisitorAccepter
setVisitorInfo in interface VisitorAccepter
|
ProGuard | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||