|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.classfile.AbstractInstructionAccessor | +--at.dms.classfile.Instruction | +--at.dms.classfile.FieldRefInstruction
Instructions thar refers to class fields. opc_getstatic, opc_putstatic, opc_getfield, opc_putfield
Constructor Summary | |
FieldRefInstruction(int opcode,
FieldRefConstant field)
Constructs a new field reference instruction from a class file. |
|
FieldRefInstruction(int opcode,
java.lang.String name,
java.lang.String type)
Constructs a new field reference instruction. |
|
FieldRefInstruction(int opcode,
java.lang.String owner,
java.lang.String name,
java.lang.String type)
Constructs a new field reference instruction. |
Method Summary | |
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
FieldRefConstant |
getFieldRefConstant()
Returns the field constant on which this expression refers itself. |
int |
getPushedOnStack()
Returns the size of data pushed on the stack by this instruction. |
byte |
getReturnType()
Returns the type pushed on the stack. |
(package private) int |
getSize()
Returns the number of bytes used by the the instruction in the code array. |
int |
getStack()
Return the amount of stack (positive or negative) used by this instruction. |
(package private) void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool. |
(package private) void |
write(ConstantPool cp,
java.io.DataOutput out)
Write this instruction into a file. |
Methods inherited from class at.dms.classfile.Instruction |
check, computeEndAddress, dump, getAddress, getLocalVar, getOpcode, getPoppedFromStack, isLiteral, setAddress, setOpcode |
Methods inherited from class at.dms.classfile.AbstractInstructionAccessor |
transform |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public FieldRefInstruction(int opcode, java.lang.String name, java.lang.String type)
opcode
- the opcode of the instruction.name
- the qualified name of the referenced object.type
- the signature of the referenced object.public FieldRefInstruction(int opcode, java.lang.String owner, java.lang.String name, java.lang.String type)
opcode
- the opcode of the instruction.name
- the qualified name of the referenced object.type
- the signature of the referenced object.public FieldRefInstruction(int opcode, FieldRefConstant field)
opcode
- the opcode of the instruction.field
- the field reference (as pooled constant.)Method Detail |
public boolean canComplete()
canComplete
in class Instruction
void resolveConstants(ConstantPool cp)
resolveConstants
in class Instruction
cp
- the constant pool for this class.int getSize()
getSize
in class Instruction
public FieldRefConstant getFieldRefConstant()
public byte getReturnType()
getReturnType
in class Instruction
public int getPushedOnStack()
getPushedOnStack
in class Instruction
public int getStack()
getStack
in class Instruction
void write(ConstantPool cp, java.io.DataOutput out) throws java.io.IOException
write
in class Instruction
cp
- the constant pool that contain all data.out
- the file where to write this object info.java.io.IOException
- An io problem has occured.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |