|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.types.reflect.ClassFile
ClassFile basically represents a Java classfile as it is found on disk. The classfile is modeled according to the Java Virtual Machine Specification. Methods are provided to edit the classfile at a very low level.
Attribute
,
Constant
,
Field
,
Method
Constructor Summary | |
ClassFile(byte[] code)
Constructor. |
Method Summary | |
java.lang.String |
compilerVersion(java.lang.String ts)
Get the encoded compiler version used to compile the source. |
java.lang.String |
encodedClassType(java.lang.String ts)
Get the encoded class type. |
boolean |
fromClassFile()
Return true if the class is from a class file. |
void |
initConstructors(ParsedClassType ct)
Initialize ct 's constructors. |
void |
initFields(ParsedClassType ct)
Initialize ct 's fields. |
void |
initInterfaces(ParsedClassType ct)
Initialize ct 's interfaces. |
void |
initMemberClasses(ParsedClassType ct)
Initialize ct 's member classes. |
void |
initMethods(ParsedClassType ct)
Initialize ct 's methods. |
java.lang.String |
name()
Get the name of the class, including the package name. |
Position |
position()
Create a position for the class file. |
long |
sourceLastModified(java.lang.String ts)
Get the encoded source modified time. |
ParsedClassType |
type(TypeSystem ts)
Extract the class type from the class file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassFile(byte[] code)
code
- A byte array containing the class dataMethod Detail |
public boolean fromClassFile()
LazyClassInitializer
fromClassFile
in interface LazyClassInitializer
public long sourceLastModified(java.lang.String ts)
public java.lang.String compilerVersion(java.lang.String ts)
public java.lang.String encodedClassType(java.lang.String ts)
public ParsedClassType type(TypeSystem ts) throws SemanticException
SemanticException
public void initMemberClasses(ParsedClassType ct)
ct
's member classes.
initMemberClasses
in interface LazyClassInitializer
public void initInterfaces(ParsedClassType ct)
ct
's interfaces.
initInterfaces
in interface LazyClassInitializer
public void initFields(ParsedClassType ct)
ct
's fields.
initFields
in interface LazyClassInitializer
public void initMethods(ParsedClassType ct)
ct
's methods.
initMethods
in interface LazyClassInitializer
public void initConstructors(ParsedClassType ct)
ct
's constructors.
initConstructors
in interface LazyClassInitializer
public Position position()
public java.lang.String name()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |