|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.classfile.Attribute | +--at.dms.classfile.CodeInfo
VMS 4.7.3: Code Attribute. It contains the Java virtual machine instructions and auxiliary information for a single method. !!! graf 990904 add support for generic attributes.
Field Summary | |
static CodeInfo |
DUM_INFO
|
Fields inherited from class at.dms.classfile.Attribute |
EMPTY |
Constructor Summary | |
protected |
CodeInfo()
This constructor is only used by SkippedCodeInfo. |
|
CodeInfo(java.io.DataInput in,
ConstantPool cp)
Create a new CodeInfo attribute. |
|
CodeInfo(Instruction[] instructions,
HandlerInfo[] handlers,
LineNumberInfo[] lineNumbers,
LocalVariableInfo[] localVariables)
Create a new CodeInfo attribute. |
Method Summary | |
int |
getCodeLength()
Returns the length in bytes of the instruction array. |
HandlerInfo[] |
getHandlers()
Returns handlers |
Instruction[] |
getInstructions()
Returns the instruction of code |
LineNumberInfo[] |
getLineNumbers()
Returns line number information |
LocalVariableInfo[] |
getLocalVariables()
Returns local variable information |
int |
getMaxLocals()
Returns the number of locals vars used in this method (including parameters). |
int |
getMaxStack()
Returns the highest value reached by the stack. |
int |
getParameterCount()
Gets the number of parameters for this method. |
(package private) int |
getSize()
Returns the space in bytes used by this attribute in the classfile |
(package private) int |
getTag()
Returns the attribute's tag |
(package private) void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
(package private) void |
setCodeLength(int codeLength)
Sets the length in bytes of the instruction array. |
(package private) void |
setMaxLocals(int maxLocals)
Sets the number of locals var used by this method. |
(package private) void |
setMaxStack(int maxStack)
Sets the highest value reached by the stack. |
void |
setParameterCount(int paramCnt)
Sets the number of parameters for this method. |
void |
transformAccessors(AccessorTransformer transformer)
Transforms the accessors contained in this class. |
(package private) void |
write(ConstantPool cp,
java.io.DataOutput out)
Write this class into the the file (out) getting data position from the constant pool |
Methods inherited from class at.dms.classfile.Attribute |
read, readCodeInfoAttribute, readInterfaceOnly |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final CodeInfo DUM_INFO
Constructor Detail |
public CodeInfo(Instruction[] instructions, HandlerInfo[] handlers, LineNumberInfo[] lineNumbers, LocalVariableInfo[] localVariables)
instructions
- array of VM instructionshandlers
- exception handlerslineNumbers
- line number informationlocalVariables
- local variable informationpublic CodeInfo(java.io.DataInput in, ConstantPool cp) throws java.io.IOException, ClassFileFormatException
in
- The stream to read from.cp
- The constant pool.java.io.IOException
- An io problem has occured.ClassFileFormatException
- Attempt to read from a bad classfile.protected CodeInfo()
Method Detail |
public void transformAccessors(AccessorTransformer transformer) throws BadAccessorException
transformer
- the transformer used to transform accessorsint getTag()
getTag
in class Attribute
int getSize()
getSize
in class Attribute
public Instruction[] getInstructions()
public HandlerInfo[] getHandlers()
public LineNumberInfo[] getLineNumbers()
public LocalVariableInfo[] getLocalVariables()
public int getCodeLength()
public int getMaxStack()
public int getMaxLocals()
public void setParameterCount(int paramCnt)
public int getParameterCount()
void setCodeLength(int codeLength)
void setMaxStack(int maxStack)
void setMaxLocals(int maxLocals)
void resolveConstants(ConstantPool cp) throws ClassFileFormatException
resolveConstants
in class Attribute
cp
- the constant pool for this classvoid write(ConstantPool cp, java.io.DataOutput out) throws java.io.IOException, ClassFileFormatException
write
in class Attribute
cp
- the constant pool that contain all dataout
- the file where to write this object infojava.io.IOException
- an io problem has occuredClassFileFormatException
- attempt to
write a bad classfile info
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |