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 SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.springframework.cglib.core.LocalVariablesSorterfirstLocalFields inherited from class org.springframework.asm.MethodVisitorapi, mv
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaaload()voidaaload(int index) voidaastore()voidvoidarray_load(Type type) voidarray_store(Type type) voidvoidathrow()voidIf the argument is a primitive class, replaces the primitive value on the top of the stack with the wrapped (Object) equivalent.voidcast_numeric(Type from, Type to) Casts from one primitive numeric type to anothervoidcatch_exception(Block block, Type exception) voidvoidvoidAllocates and fills an Object[] array with the arguments to the current method.voiddup()voiddup_x1()voiddup_x2()voiddup2()voiddup2_x1()voiddup2_x2()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidinstance_of(Type type) voidvoidinvoke(MethodInfo method) voidinvoke(MethodInfo method, Type virtualType) voidinvoke_constructor(Type type) voidinvoke_constructor(Type type, Signature sig) voidvoidvoidinvoke_interface(Type owner, Signature sig) voidinvoke_static(Type owner, Signature sig) Deprecated.voidinvoke_static(Type owner, Signature sig, boolean isInterface) voidvoidinvoke_virtual(Type owner, Signature sig) voidbooleanvoidload_arg(int index) Pushes the specified argument of the current method onto the stack.voidPushes all of the arguments of the current method onto the stack.voidload_args(int fromArg, int count) voidload_local(Local local) voidmake_local(Type type) voidvoidvoidvoidvoidnew_instance(Type type) voidvoidnewarray()voidvoidnot()Toggles the integer on the top of the stack from 1 to 0 or vice versavoidpop()voidpop2()voidprocess_switch(int[] keys, ProcessSwitchCallback callback) voidprocess_switch(int[] keys, ProcessSwitchCallback callback, boolean useTable) voidpush(boolean value) voidpush(double value) voidpush(float value) voidpush(int i) voidpush(long value) voidvoidvoidvoidvoidvoidstore_local(Local local) voidsuper_getfield(String name, Type type) voidsuper_getstatic(String name, Type type) voidvoidsuper_invoke(Signature sig) voidvoidvoidsuper_putfield(String name, Type type) voidsuper_putstatic(String name, Type type) voidswap()voidvoidthrow_exception(Type type, String msg) voidIf the argument is a primitive class, replaces the object on the top of the stack with the unwrapped (primitive) equivalent.voidunbox_or_zero(Type type) Unboxes the object on the top of the stack.voidvisitMaxs(int maxStack, int maxLocals) Visits the maximum stack size and the maximum number of local variables of the method.voidzero_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.LocalVariablesSorternewLocal, visitIincInsn, visitLocalVariable, visitVarInsnMethods inherited from class org.springframework.asm.MethodVisitorgetDelegate, 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- 
ADDpublic static final int ADD- See Also:
 
- 
MULpublic static final int MUL- See Also:
 
- 
XORpublic static final int XOR- See Also:
 
- 
USHRpublic static final int USHR- See Also:
 
- 
SUBpublic static final int SUB- See Also:
 
- 
DIVpublic static final int DIV- See Also:
 
- 
NEGpublic static final int NEG- See Also:
 
- 
REMpublic static final int REM- See Also:
 
- 
ANDpublic static final int AND- See Also:
 
- 
ORpublic static final int OR- See Also:
 
- 
GTpublic static final int GT- See Also:
 
- 
LTpublic static final int LT- See Also:
 
- 
GEpublic static final int GE- See Also:
 
- 
LEpublic static final int LE- See Also:
 
- 
NEpublic static final int NE- See Also:
 
- 
EQpublic static final int EQ- See Also:
 
 
- 
- 
Constructor Details- 
CodeEmitter
 
- 
- 
Method Details- 
isStaticHookpublic boolean isStaticHook()
- 
getSignature
- 
getReturnType
- 
getMethodInfo
- 
getClassEmitter
- 
end_methodpublic void end_method()
- 
begin_block
- 
catch_exception
- 
goTo
- 
ifnull
- 
ifnonnull
- 
if_jump
- 
if_icmp
- 
if_cmp
- 
poppublic void pop()
- 
pop2public void pop2()
- 
duppublic void dup()
- 
dup2public void dup2()
- 
dup_x1public void dup_x1()
- 
dup_x2public void dup_x2()
- 
dup2_x1public void dup2_x1()
- 
dup2_x2public void dup2_x2()
- 
swappublic void swap()
- 
aconst_nullpublic void aconst_null()
- 
swap
- 
monitorenterpublic void monitorenter()
- 
monitorexitpublic void monitorexit()
- 
math
- 
array_load
- 
array_store
- 
cast_numericCasts from one primitive numeric type to another
- 
pushpublic void push(int i) 
- 
pushpublic void push(long value) 
- 
pushpublic void push(float value) 
- 
pushpublic void push(double value) 
- 
push
- 
newarraypublic void newarray()
- 
newarray
- 
arraylengthpublic void arraylength()
- 
load_thispublic void load_this()
- 
load_argspublic void load_args()Pushes all of the arguments of the current method onto the stack.
- 
load_argpublic 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_argspublic void load_args(int fromArg, int count) 
- 
iinc
- 
store_local
- 
load_local
- 
return_valuepublic void return_value()
- 
getfield
- 
putfield
- 
super_getfield
- 
super_putfield
- 
super_getstatic
- 
super_putstatic
- 
getfield
- 
putfield
- 
getstatic
- 
putstatic
- 
super_invokepublic void super_invoke()
- 
super_invoke
- 
invoke_constructor
- 
super_invoke_constructorpublic void super_invoke_constructor()
- 
invoke_constructor_thispublic void invoke_constructor_this()
- 
invoke_interface
- 
invoke_virtual
- 
invoke_staticDeprecated.
- 
invoke_static
- 
invoke_virtual_this
- 
invoke_static_this
- 
invoke_constructor
- 
invoke_constructor_this
- 
super_invoke_constructor
- 
new_instance_thispublic void new_instance_this()
- 
new_instance
- 
aaloadpublic void aaload(int index) 
- 
aaloadpublic void aaload()
- 
aastorepublic void aastore()
- 
athrowpublic void athrow()
- 
make_label
- 
make_local
- 
make_local
- 
checkcast_thispublic void checkcast_this()
- 
checkcast
- 
instance_of
- 
instance_of_thispublic void instance_of_this()
- 
process_switch
- 
process_switch
- 
mark
- 
pushpublic void push(boolean value) 
- 
notpublic void not()Toggles the integer on the top of the stack from 1 to 0 or vice versa
- 
throw_exception
- 
boxIf 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
 
- 
unboxIf 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_arraypublic 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_nullPushes a zero onto the stack if the argument is a primitive class, or a null otherwise.
- 
unbox_or_zeroUnboxes the object on the top of the stack. If the object is null, the unboxed primitive value becomes zero.
- 
visitMaxspublic void visitMaxs(int maxStack, int maxLocals) Description copied from class:MethodVisitorVisits the maximum stack size and the maximum number of local variables of the method.- Overrides:
- visitMaxsin class- LocalVariablesSorter
- Parameters:
- maxStack- maximum stack size of the method.
- maxLocals- maximum number of local variables for the method.
 
- 
invoke
- 
invoke
 
-