类 CodeEmitter
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- net.sf.cglib.core.LocalVariablesSorter
-
- net.sf.cglib.core.CodeEmitter
-
public class CodeEmitter extends LocalVariablesSorter
- 作者:
- Juozas Baliuka, Chris Nokleberg
-
-
字段概要
字段 修饰符和类型 字段 说明 static intADDstatic intANDstatic intDIVstatic intEQstatic intGEstatic intGTstatic intLEstatic intLTstatic intMULstatic intNEstatic intNEGstatic intORstatic intREMstatic intSUBstatic intUSHRstatic intXOR-
从类继承的字段 net.sf.cglib.core.LocalVariablesSorter
firstLocal
-
-
构造器概要
构造器 构造器 说明 CodeEmitter(CodeEmitter wrap)
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidaaload()voidaaload(int index)voidaastore()voidaconst_null()voidarray_load(org.objectweb.asm.Type type)voidarray_store(org.objectweb.asm.Type type)voidarraylength()voidathrow()Blockbegin_block()voidbox(org.objectweb.asm.Type type)If the argument is a primitive class, replaces the primitive value on the top of the stack with the wrapped (Object) equivalent.voidcast_numeric(org.objectweb.asm.Type from, org.objectweb.asm.Type to)Casts from one primitive numeric type to anothervoidcatch_exception(Block block, org.objectweb.asm.Type exception)voidcheckcast(org.objectweb.asm.Type type)voidcheckcast_this()voidcreate_arg_array()Allocates and fills an Object[] array with the arguments to the current method.voiddup()voiddup_x1()voiddup_x2()voiddup2()voiddup2_x1()voiddup2_x2()voidend_method()ClassEmittergetClassEmitter()voidgetfield(java.lang.String name)voidgetfield(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)MethodInfogetMethodInfo()org.objectweb.asm.TypegetReturnType()SignaturegetSignature()voidgetstatic(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)voidgoTo(org.objectweb.asm.Label label)voidif_cmp(org.objectweb.asm.Type type, int mode, org.objectweb.asm.Label label)voidif_icmp(int mode, org.objectweb.asm.Label label)voidif_jump(int mode, org.objectweb.asm.Label label)voidifnonnull(org.objectweb.asm.Label label)voidifnull(org.objectweb.asm.Label label)voidiinc(Local local, int amount)voidinstance_of(org.objectweb.asm.Type type)voidinstance_of_this()voidinvoke(MethodInfo method)voidinvoke(MethodInfo method, org.objectweb.asm.Type virtualType)voidinvoke_constructor(org.objectweb.asm.Type type)voidinvoke_constructor(org.objectweb.asm.Type type, Signature sig)voidinvoke_constructor_this()voidinvoke_constructor_this(Signature sig)voidinvoke_interface(org.objectweb.asm.Type owner, Signature sig)voidinvoke_static(org.objectweb.asm.Type owner, Signature sig)已过时。voidinvoke_static(org.objectweb.asm.Type owner, Signature sig, boolean isInterface)voidinvoke_static_this(Signature sig)voidinvoke_virtual(org.objectweb.asm.Type owner, Signature sig)voidinvoke_virtual_this(Signature sig)booleanisStaticHook()voidload_arg(int index)Pushes the specified argument of the current method onto the stack.voidload_args()Pushes all of the arguments of the current method onto the stack.voidload_args(int fromArg, int count)voidload_local(Local local)voidload_this()org.objectweb.asm.Labelmake_label()Localmake_local()Localmake_local(org.objectweb.asm.Type type)voidmark(org.objectweb.asm.Label label)voidmath(int op, org.objectweb.asm.Type type)voidmonitorenter()voidmonitorexit()voidnew_instance(org.objectweb.asm.Type type)voidnew_instance_this()voidnewarray()voidnewarray(org.objectweb.asm.Type type)voidnot()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)voidpush(java.lang.String value)voidputfield(java.lang.String name)voidputfield(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)voidputstatic(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)voidreturn_value()voidstore_local(Local local)voidsuper_getfield(java.lang.String name, org.objectweb.asm.Type type)voidsuper_getstatic(java.lang.String name, org.objectweb.asm.Type type)voidsuper_invoke()voidsuper_invoke(Signature sig)voidsuper_invoke_constructor()voidsuper_invoke_constructor(Signature sig)voidsuper_putfield(java.lang.String name, org.objectweb.asm.Type type)voidsuper_putstatic(java.lang.String name, org.objectweb.asm.Type type)voidswap()voidswap(org.objectweb.asm.Type prev, org.objectweb.asm.Type type)voidthrow_exception(org.objectweb.asm.Type type, java.lang.String msg)voidunbox(org.objectweb.asm.Type type)If the argument is a primitive class, replaces the object on the top of the stack with the unwrapped (primitive) equivalent.voidunbox_or_zero(org.objectweb.asm.Type type)Unboxes the object on the top of the stack.voidvisitMaxs(int maxStack, int maxLocals)voidzero_or_null(org.objectweb.asm.Type type)Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise.-
从类继承的方法 net.sf.cglib.core.LocalVariablesSorter
newLocal, visitIincInsn, visitLocalVariable, visitVarInsn
-
从类继承的方法 org.objectweb.asm.MethodVisitor
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
-
-
-
-
字段详细资料
-
ADD
public static final int ADD
- 另请参阅:
- 常量字段值
-
MUL
public static final int MUL
- 另请参阅:
- 常量字段值
-
XOR
public static final int XOR
- 另请参阅:
- 常量字段值
-
USHR
public static final int USHR
- 另请参阅:
- 常量字段值
-
SUB
public static final int SUB
- 另请参阅:
- 常量字段值
-
DIV
public static final int DIV
- 另请参阅:
- 常量字段值
-
NEG
public static final int NEG
- 另请参阅:
- 常量字段值
-
REM
public static final int REM
- 另请参阅:
- 常量字段值
-
AND
public static final int AND
- 另请参阅:
- 常量字段值
-
OR
public static final int OR
- 另请参阅:
- 常量字段值
-
GT
public static final int GT
- 另请参阅:
- 常量字段值
-
LT
public static final int LT
- 另请参阅:
- 常量字段值
-
GE
public static final int GE
- 另请参阅:
- 常量字段值
-
LE
public static final int LE
- 另请参阅:
- 常量字段值
-
NE
public static final int NE
- 另请参阅:
- 常量字段值
-
EQ
public static final int EQ
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
CodeEmitter
public CodeEmitter(CodeEmitter wrap)
-
-
方法详细资料
-
isStaticHook
public boolean isStaticHook()
-
getSignature
public Signature getSignature()
-
getReturnType
public org.objectweb.asm.Type getReturnType()
-
getMethodInfo
public MethodInfo getMethodInfo()
-
getClassEmitter
public ClassEmitter getClassEmitter()
-
end_method
public void end_method()
-
begin_block
public Block begin_block()
-
catch_exception
public void catch_exception(Block block, org.objectweb.asm.Type exception)
-
goTo
public void goTo(org.objectweb.asm.Label label)
-
ifnull
public void ifnull(org.objectweb.asm.Label label)
-
ifnonnull
public void ifnonnull(org.objectweb.asm.Label label)
-
if_jump
public void if_jump(int mode, org.objectweb.asm.Label label)
-
if_icmp
public void if_icmp(int mode, org.objectweb.asm.Label label)
-
if_cmp
public void if_cmp(org.objectweb.asm.Type type, int mode, org.objectweb.asm.Label label)
-
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
public void swap(org.objectweb.asm.Type prev, org.objectweb.asm.Type type)
-
monitorenter
public void monitorenter()
-
monitorexit
public void monitorexit()
-
math
public void math(int op, org.objectweb.asm.Type type)
-
array_load
public void array_load(org.objectweb.asm.Type type)
-
array_store
public void array_store(org.objectweb.asm.Type type)
-
cast_numeric
public void cast_numeric(org.objectweb.asm.Type from, org.objectweb.asm.Type to)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
public void push(java.lang.String value)
-
newarray
public void newarray()
-
newarray
public void newarray(org.objectweb.asm.Type type)
-
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.- 参数:
index- the zero-based index into the argument list
-
load_args
public void load_args(int fromArg, int count)
-
iinc
public void iinc(Local local, int amount)
-
store_local
public void store_local(Local local)
-
load_local
public void load_local(Local local)
-
return_value
public void return_value()
-
getfield
public void getfield(java.lang.String name)
-
putfield
public void putfield(java.lang.String name)
-
super_getfield
public void super_getfield(java.lang.String name, org.objectweb.asm.Type type)
-
super_putfield
public void super_putfield(java.lang.String name, org.objectweb.asm.Type type)
-
super_getstatic
public void super_getstatic(java.lang.String name, org.objectweb.asm.Type type)
-
super_putstatic
public void super_putstatic(java.lang.String name, org.objectweb.asm.Type type)
-
getfield
public void getfield(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)
-
putfield
public void putfield(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)
-
getstatic
public void getstatic(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)
-
putstatic
public void putstatic(org.objectweb.asm.Type owner, java.lang.String name, org.objectweb.asm.Type type)
-
super_invoke
public void super_invoke()
-
super_invoke
public void super_invoke(Signature sig)
-
invoke_constructor
public void invoke_constructor(org.objectweb.asm.Type type)
-
super_invoke_constructor
public void super_invoke_constructor()
-
invoke_constructor_this
public void invoke_constructor_this()
-
invoke_interface
public void invoke_interface(org.objectweb.asm.Type owner, Signature sig)
-
invoke_virtual
public void invoke_virtual(org.objectweb.asm.Type owner, Signature sig)
-
invoke_static
@Deprecated public void invoke_static(org.objectweb.asm.Type owner, Signature sig)已过时。
-
invoke_static
public void invoke_static(org.objectweb.asm.Type owner, Signature sig, boolean isInterface)
-
invoke_virtual_this
public void invoke_virtual_this(Signature sig)
-
invoke_static_this
public void invoke_static_this(Signature sig)
-
invoke_constructor
public void invoke_constructor(org.objectweb.asm.Type type, Signature sig)
-
invoke_constructor_this
public void invoke_constructor_this(Signature sig)
-
super_invoke_constructor
public void super_invoke_constructor(Signature sig)
-
new_instance_this
public void new_instance_this()
-
new_instance
public void new_instance(org.objectweb.asm.Type type)
-
aaload
public void aaload(int index)
-
aaload
public void aaload()
-
aastore
public void aastore()
-
athrow
public void athrow()
-
make_label
public org.objectweb.asm.Label make_label()
-
make_local
public Local make_local()
-
make_local
public Local make_local(org.objectweb.asm.Type type)
-
checkcast_this
public void checkcast_this()
-
checkcast
public void checkcast(org.objectweb.asm.Type type)
-
instance_of
public void instance_of(org.objectweb.asm.Type type)
-
instance_of_this
public void instance_of_this()
-
process_switch
public void process_switch(int[] keys, ProcessSwitchCallback callback)
-
process_switch
public void process_switch(int[] keys, ProcessSwitchCallback callback, boolean useTable)
-
mark
public void mark(org.objectweb.asm.Label label)
-
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
public void throw_exception(org.objectweb.asm.Type type, java.lang.String msg)
-
box
public void box(org.objectweb.asm.Type type)
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.- 参数:
type- the class indicating the current type of the top stack value
-
unbox
public void unbox(org.objectweb.asm.Type type)
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.- 参数:
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
public void zero_or_null(org.objectweb.asm.Type type)
Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise.
-
unbox_or_zero
public void unbox_or_zero(org.objectweb.asm.Type type)
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)- 覆盖:
visitMaxs在类中LocalVariablesSorter
-
invoke
public void invoke(MethodInfo method, org.objectweb.asm.Type virtualType)
-
invoke
public void invoke(MethodInfo method)
-
-