|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.transjvm.TClass
public class TClass
A class used for building JVM class files.
Constructor Summary | |
---|---|
TClass(java.lang.String name,
int flags)
Equivalent to TClass(name, modifier, true) . |
|
TClass(java.lang.String name,
int flags,
boolean _super)
Creates a new TClass object |
Method Summary | |
---|---|
void |
add(TConstructor constructor)
Adds a constructor |
void |
add(TField field)
Adds a field |
void |
add(TMethod method)
Adds a method |
void |
addDefaultConstructor()
Adds the default constructor to this class. |
byte[] |
getBytes()
Returns the byte array for this TClass, in standard JVM class file format. |
void |
implement(TypeID interfaceType)
Adds an interface to the list of interfaces implemented by this class. |
void |
setSourceFile(java.lang.String sourceName)
Sets the source file of this TClass for debugging. |
void |
setSuper(TypeID superType)
Sets the super type of this TClass. |
void |
setVersion(int majorVersion,
int minorVersion)
Sets the version numbers |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TClass(java.lang.String name, int flags, boolean _super)
name
- The name of this class.flags
- Flags for this class_super
- Defines semantics for invoke-special, should almost always be true.Flags
public TClass(java.lang.String name, int flags)
TClass(name, modifier, true)
.
Method Detail |
---|
public void setSuper(TypeID superType)
superType
- The super class
java.lang.IllegalArgumentException
- if superType is primitive or array.public void setSourceFile(java.lang.String sourceName)
sourceName
- The short file name of the source file.public java.lang.String toString()
toString
in class java.lang.Object
public void setVersion(int majorVersion, int minorVersion)
majorVersion
- The new major version valueminorVersion
- The new minor version valuepublic void add(TMethod method)
method
- The method to be added to this class.public void add(TConstructor constructor)
constructor
- The constructor to be added to this class.public void add(TField field)
field
- The field to be added to this class.public void implement(TypeID interfaceType)
interfaceType
- The interface this class claims to implement
java.lang.IllegalArgumentException
- if interfaceType is a primitive or array type.public byte[] getBytes()
public void addDefaultConstructor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |