Package serp.bytecode
Class ClassConstantInstruction
- java.lang.Object
-
- serp.bytecode.ClassConstantInstruction
-
public class ClassConstantInstruction extends java.lang.Object
Pseudo-instruction used to placeClass
objects onto the stack. This logical instruction may actually involve a large chunk of code, and may even add static synthetic fields and methods to the owning class. Therefore, once the type of class being loaded is set, it cannot be changed. Also, this instruction is invalid as the target of any jump instruction or exception handler.- Author:
- Abe White
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instruction
setClass(java.lang.Class type)
Set the type of class being loaded.Instruction
setClass(java.lang.String name)
Set the type of class being loaded.Instruction
setClass(BCClass type)
Set the type of class being loaded.
-
-
-
Method Detail
-
setClass
public Instruction setClass(java.lang.String name)
Set the type of class being loaded.- Returns:
- the first Instruction of the block added by setting the type
- Throws:
java.lang.IllegalStateException
- if type has already been set
-
setClass
public Instruction setClass(java.lang.Class type)
Set the type of class being loaded.- Returns:
- the first Instruction of the block added by setting the type
- Throws:
java.lang.IllegalStateException
- if type has already been set
-
setClass
public Instruction setClass(BCClass type)
Set the type of class being loaded.- Returns:
- the first Instruction of the block added by setting the type
- Throws:
java.lang.IllegalStateException
- if type has already been set
-
-