|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.Attribute
org.multijava.util.classfile.UniverseClassAttribute
This class implements a JUTS class attribute. It contains the JUTS version (e.g. "1.0") plus a boolean flag that indicates if the class has been compiled with run-time checks enabled. The format of the attribute (not including the standard initial six bytes): - the first two bytes are an index into the constant pool. The constant pool entry at that index must be String constant - the next byte is interpreted as a boolean value, and tells if the class has run-time checks enabled or not This attribute is recognized by UniverseAttributeParser. VMS 4.7.1: The attribute's name is org.multijava.universe_class
UniverseAttributeParser| Field Summary | |
private static AsciiConstant |
attr
|
private boolean |
runtimeSupport
does the class have run-time checks enabled? |
(package private) static String |
tagString
the name of the attribute |
private AsciiConstant |
version
the version of JUTS used |
| Constructor Summary | |
UniverseClassAttribute(DataInput in,
ConstantPool cp)
Constructs a universe version attribute from a classfile stream. |
|
UniverseClassAttribute(String version,
boolean runtimeSupport)
Create a Universe version attribute. |
|
| Method Summary | |
protected int |
getSize()
Returns the space in bytes used by this attribute in the classfile. |
protected int |
getTag()
Returns the attribute's tag. |
String |
getVersion()
Return the version of the Universe Type System used. |
boolean |
hasRuntimeSupport()
Return if the class was compiled with run-time support enabled. |
protected void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool. |
protected void |
write(ConstantPool cp,
DataOutput out)
Write this class into the the file (out) getting data position from the constant pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final String tagString
private static AsciiConstant attr
private AsciiConstant version
private boolean runtimeSupport
| Constructor Detail |
public UniverseClassAttribute(String version,
boolean runtimeSupport)
version - the version of the Universe Type System usedruntimeSupport - does the class have run-time checks
public UniverseClassAttribute(DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
in - the stream to read fromcp - the constant pool
IOException - an IO problem has occured
ClassFileFormatException - the classfile is malformed| Method Detail |
protected int getTag()
protected int getSize()
public String getVersion()
versionpublic boolean hasRuntimeSupport()
runtimeSupportprotected void resolveConstants(ConstantPool cp)
cp - the constant pool for this class
protected void write(ConstantPool cp,
DataOutput out)
throws IOException
cp - the constant poolout - the output stream
IOException - an IO problem has occurred
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||