|
mjc | ||||||||||
| 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.UniverseMethodAttribute
This class implements a JUTS method attribute. The attribute contains information about the method's purity and the universe annotations of its parameters and return type. The format of the attribute (not including the standard initial six bytes): - the first byte is either 0 or 1, and represents the method's purity - the second byte is the return type's annotation. This is zero if the method has no return type - the following bytes are the parameter's annotations This attribute is recognized by UniverseAttributeParser. VMS 4.7.1: The attribute's name is org.multijava.universe_method
UniverseAttributeParser| Field Summary | |
private static AsciiConstant |
attr
|
private boolean |
isPure
the method's purity |
private byte[] |
paramConstants
the encoded universe type modifiers for the parameter types |
private byte |
retConstant
the encoded universe type modifier for the return type |
(package private) static String |
tagString
the attribute's name |
| Constructor Summary | |
UniverseMethodAttribute(boolean isPure,
byte retTypeByteConstant,
byte[] paramConstants)
Construct a method attribute for a method with non-void return type. |
|
UniverseMethodAttribute(boolean isPure,
byte[] paramConstants)
Construct a method attribute for a method with void return type. |
|
UniverseMethodAttribute(DataInput in,
ConstantPool cp)
Constructs a Universe Method Attribute from a class file stream. |
|
| Method Summary | |
byte[] |
getParamConstants()
Return the byte constants representing the parameter annotations. |
boolean |
getPurity()
Return the method's purity. |
byte |
getRetTypeConstant()
Return the byte constant representing the return type's annotation. |
protected int |
getSize()
Return the attribute's size, this attribute has variable size dependent on the number of parameters. |
protected int |
getTag()
Return this attribute's tag. |
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 boolean isPure
private byte retConstant
private byte[] paramConstants
| Constructor Detail |
public UniverseMethodAttribute(boolean isPure,
byte[] paramConstants)
isPure - the purity of the method paramConstants - the byte constants for the parameters
public UniverseMethodAttribute(boolean isPure,
byte retTypeByteConstant,
byte[] paramConstants)
isPure - the purity of the methodretTypeByteConstant - the byte constant for the return type paramConstants - the byte constants for the parameters
public UniverseMethodAttribute(DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
in - the stream to read fromcp - the constant pool
IOException - an io problem has occured
ClassFileFormatException - attempt to
write a bad classfile info| Method Detail |
public boolean getPurity()
public byte getRetTypeConstant()
public byte[] getParamConstants()
protected int getTag()
protected int getSize()
protected void resolveConstants(ConstantPool cp)
throws ClassFileFormatException
cp - the constant pool for this class
ClassFileFormatException
protected void write(ConstantPool cp,
DataOutput out)
throws IOException,
ClassFileFormatException
cp - the constant pool that contain all dataout - the file where to write this object info
IOException - an io problem has occured
ClassFileFormatException
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||