|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.techtrader.modules.tools.bytecode
Class ReturnInstruction

java.lang.Objectcom.techtrader.modules.tools.bytecode.Instruction
com.techtrader.modules.tools.bytecode.ReturnInstruction
- All Implemented Interfaces:
- Constants, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- public class ReturnInstruction
- extends Instruction
Represents a return instruction.
| Field Summary | |
private java.lang.Class |
_type
|
protected static java.util.Map |
_typeNames
|
| Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction |
_byteIndex, _opcode, _opcodeTypes, _owner |
| Constructor Summary | |
protected |
ReturnInstruction(Code owner)
|
protected |
ReturnInstruction(Code owner,
int opcode,
java.lang.Class type)
|
| Method Summary | |
void |
acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
Accept a visit from a BCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this object. |
private void |
calculateOpCode()
|
protected void |
copy(Instruction orig)
|
boolean |
equals(java.lang.Object other)
Two return instructions are equal if the types they reference are equal or if either unset. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
java.lang.Class |
getType()
Get the type to return; this is one of: int, float, double, long, void, or Object.class. |
java.lang.String |
getTypeName()
Get the type to return; this is one of: int, float, double, long, void, or java.lang.Object. |
ReturnInstruction |
setType(java.lang.Class type)
Set the type to rturn; Object types other than Object.class will be demoted to Object.class, and primitives that have no direct support (boolean, char, short, byte) will be converted to int.class. |
ReturnInstruction |
setTypeName(java.lang.String name)
Set the type to load by name. |
| Methods inherited from class com.techtrader.modules.tools.bytecode.Instruction |
getByteIndex, getLength, getName, getOpCode, getOwner, invalidate, readData, setByteIndex, setOpCode, writeData |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_typeNames
protected static final java.util.Map _typeNames
_type
private java.lang.Class _type
| Constructor Detail |
ReturnInstruction
protected ReturnInstruction(Code owner)
ReturnInstruction
protected ReturnInstruction(Code owner, int opcode, java.lang.Class type)
| Method Detail |
getType
public java.lang.Class getType()
- Get the type to return; this is one of:
int, float, double, long, void, or Object.class.
If the type has not been set, this method will return null.
getTypeName
public java.lang.String getTypeName()
- Get the type to return; this is one of:
int, float, double, long, void, or java.lang.Object.
If the type has not been set, this method will return null.
setType
public ReturnInstruction setType(java.lang.Class type)
- Set the type to rturn; Object types other than Object.class
will be demoted to Object.class, and primitives that have no direct
support (boolean, char, short, byte) will be converted to int.class.
setTypeName
public ReturnInstruction setTypeName(java.lang.String name)
- Set the type to load by name.
equals
public boolean equals(java.lang.Object other)
- Two return instructions are equal if the types they
reference are equal or if either unset.
- Overrides:
equalsin classInstruction
getStackChange
public int getStackChange()
- Description copied from class:
Instruction - Return the number of stack positions this instruction pushes
or pops during its execution.
- Overrides:
getStackChangein classInstruction
copy
protected void copy(Instruction orig)
- Overrides:
copyin classInstruction
calculateOpCode
private void calculateOpCode()
acceptVisit
public void acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
- Description copied from interface:
com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor - Accept a visit from a BCVisitor, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this object.
- Specified by:
acceptVisitin interfacecom.techtrader.modules.tools.bytecode.visitor.VisitAcceptor- Overrides:
acceptVisitin classInstruction
|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC