Package org.springframework.cglib.core
Class CodeEmitter
java.lang.Object
org.springframework.asm.MethodVisitor
org.springframework.cglib.core.LocalVariablesSorter
org.springframework.cglib.core.CodeEmitter
- Author:
- Juozas Baliuka, Chris Nokleberg
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.springframework.cglib.core.LocalVariablesSorter
firstLocal
Fields inherited from class org.springframework.asm.MethodVisitor
api, mv
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aaload()
void
aaload
(int index) void
aastore()
void
void
array_load
(Type type) void
array_store
(Type type) void
void
athrow()
void
If the argument is a primitive class, replaces the primitive value on the top of the stack with the wrapped (Object) equivalent.void
cast_numeric
(Type from, Type to) Casts from one primitive numeric type to anothervoid
catch_exception
(Block block, Type exception) void
void
void
Allocates and fills an Object[] array with the arguments to the current method.void
dup()
void
dup_x1()
void
dup_x2()
void
dup2()
void
dup2_x1()
void
dup2_x2()
void
void
void
void
void
void
void
void
void
void
void
void
instance_of
(Type type) void
void
invoke
(MethodInfo method) void
invoke
(MethodInfo method, Type virtualType) void
invoke_constructor
(Type type) void
invoke_constructor
(Type type, Signature sig) void
void
void
invoke_interface
(Type owner, Signature sig) void
invoke_static
(Type owner, Signature sig) Deprecated.void
invoke_static
(Type owner, Signature sig, boolean isInterface) void
void
invoke_virtual
(Type owner, Signature sig) void
boolean
void
load_arg
(int index) Pushes the specified argument of the current method onto the stack.void
Pushes all of the arguments of the current method onto the stack.void
load_args
(int fromArg, int count) void
load_local
(Local local) void
make_local
(Type type) void
void
void
void
void
new_instance
(Type type) void
void
newarray()
void
void
not()
Toggles the integer on the top of the stack from 1 to 0 or vice versavoid
pop()
void
pop2()
void
process_switch
(int[] keys, ProcessSwitchCallback callback) void
process_switch
(int[] keys, ProcessSwitchCallback callback, boolean useTable) void
push
(boolean value) void
push
(double value) void
push
(float value) void
push
(int i) void
push
(long value) void
void
void
void
void
void
store_local
(Local local) void
super_getfield
(String name, Type type) void
super_getstatic
(String name, Type type) void
void
super_invoke
(Signature sig) void
void
void
super_putfield
(String name, Type type) void
super_putstatic
(String name, Type type) void
swap()
void
void
throw_exception
(Type type, String msg) void
If the argument is a primitive class, replaces the object on the top of the stack with the unwrapped (primitive) equivalent.void
unbox_or_zero
(Type type) Unboxes the object on the top of the stack.void
visitMaxs
(int maxStack, int maxLocals) Visits the maximum stack size and the maximum number of local variables of the method.void
zero_or_null
(Type type) Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise.Methods inherited from class org.springframework.cglib.core.LocalVariablesSorter
newLocal, visitIincInsn, visitLocalVariable, visitVarInsn
Methods inherited from class org.springframework.asm.MethodVisitor
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitFrame, visitInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLabel, visitLdcInsn, visitLineNumber, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTryCatchBlock, visitTypeAnnotation, visitTypeInsn
-
Field Details
-
ADD
public static final int ADD- See Also:
-
MUL
public static final int MUL- See Also:
-
XOR
public static final int XOR- See Also:
-
USHR
public static final int USHR- See Also:
-
SUB
public static final int SUB- See Also:
-
DIV
public static final int DIV- See Also:
-
NEG
public static final int NEG- See Also:
-
REM
public static final int REM- See Also:
-
AND
public static final int AND- See Also:
-
OR
public static final int OR- See Also:
-
GT
public static final int GT- See Also:
-
LT
public static final int LT- See Also:
-
GE
public static final int GE- See Also:
-
LE
public static final int LE- See Also:
-
NE
public static final int NE- See Also:
-
EQ
public static final int EQ- See Also:
-
-
Constructor Details
-
CodeEmitter
-
-
Method Details
-
isStaticHook
public boolean isStaticHook() -
getSignature
-
getReturnType
-
getMethodInfo
-
getClassEmitter
-
end_method
public void end_method() -
begin_block
-
catch_exception
-
goTo
-
ifnull
-
ifnonnull
-
if_jump
-
if_icmp
-
if_cmp
-
pop
public void pop() -
pop2
public void pop2() -
dup
public void dup() -
dup2
public void dup2() -
dup_x1
public void dup_x1() -
dup_x2
public void dup_x2() -
dup2_x1
public void dup2_x1() -
dup2_x2
public void dup2_x2() -
swap
public void swap() -
aconst_null
public void aconst_null() -
swap
-
monitorenter
public void monitorenter() -
monitorexit
public void monitorexit() -
math
-
array_load
-
array_store
-
cast_numeric
Casts from one primitive numeric type to another -
push
public void push(int i) -
push
public void push(long value) -
push
public void push(float value) -
push
public void push(double value) -
push
-
newarray
public void newarray() -
newarray
-
arraylength
public void arraylength() -
load_this
public void load_this() -
load_args
public void load_args()Pushes all of the arguments of the current method onto the stack. -
load_arg
public void load_arg(int index) Pushes the specified argument of the current method onto the stack.- Parameters:
index
- the zero-based index into the argument list
-
load_args
public void load_args(int fromArg, int count) -
iinc
-
store_local
-
load_local
-
return_value
public void return_value() -
getfield
-
putfield
-
super_getfield
-
super_putfield
-
super_getstatic
-
super_putstatic
-
getfield
-
putfield
-
getstatic
-
putstatic
-
super_invoke
public void super_invoke() -
super_invoke
-
invoke_constructor
-
super_invoke_constructor
public void super_invoke_constructor() -
invoke_constructor_this
public void invoke_constructor_this() -
invoke_interface
-
invoke_virtual
-
invoke_static
Deprecated. -
invoke_static
-
invoke_virtual_this
-
invoke_static_this
-
invoke_constructor
-
invoke_constructor_this
-
super_invoke_constructor
-
new_instance_this
public void new_instance_this() -
new_instance
-
aaload
public void aaload(int index) -
aaload
public void aaload() -
aastore
public void aastore() -
athrow
public void athrow() -
make_label
-
make_local
-
make_local
-
checkcast_this
public void checkcast_this() -
checkcast
-
instance_of
-
instance_of_this
public void instance_of_this() -
process_switch
-
process_switch
-
mark
-
push
public void push(boolean value) -
not
public void not()Toggles the integer on the top of the stack from 1 to 0 or vice versa -
throw_exception
-
box
If the argument is a primitive class, replaces the primitive value on the top of the stack with the wrapped (Object) equivalent. For example, char -> Character. If the class is Void, a null is pushed onto the stack instead.- Parameters:
type
- the class indicating the current type of the top stack value
-
unbox
If the argument is a primitive class, replaces the object on the top of the stack with the unwrapped (primitive) equivalent. For example, Character -> char.- Parameters:
type
- the class indicating the desired type of the top stack value
-
create_arg_array
public void create_arg_array()Allocates and fills an Object[] array with the arguments to the current method. Primitive values are inserted as their boxed (Object) equivalents. -
zero_or_null
Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise. -
unbox_or_zero
Unboxes the object on the top of the stack. If the object is null, the unboxed primitive value becomes zero. -
visitMaxs
public void visitMaxs(int maxStack, int maxLocals) Description copied from class:MethodVisitor
Visits the maximum stack size and the maximum number of local variables of the method.- Overrides:
visitMaxs
in classLocalVariablesSorter
- Parameters:
maxStack
- maximum stack size of the method.maxLocals
- maximum number of local variables for the method.
-
invoke
-
invoke
-