Package net.sf.cglib.core
Class EmitUtils
- java.lang.Object
-
- net.sf.cglib.core.EmitUtils
-
public class EmitUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEmitUtils.ArrayDelimiters
-
Field Summary
Fields Modifier and Type Field Description static EmitUtils.ArrayDelimitersDEFAULT_DELIMITERS
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidadd_properties(ClassEmitter ce, java.lang.String[] names, org.objectweb.asm.Type[] types)static voidadd_property(ClassEmitter ce, java.lang.String name, org.objectweb.asm.Type type, java.lang.String fieldName)static voidappend_string(CodeEmitter e, org.objectweb.asm.Type type, EmitUtils.ArrayDelimiters delims, Customizer customizer)Deprecated.static voidappend_string(CodeEmitter e, org.objectweb.asm.Type type, EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry)static CodeEmitterbegin_method(ClassEmitter e, MethodInfo method)static CodeEmitterbegin_method(ClassEmitter e, MethodInfo method, int access)static voidconstructor_switch(CodeEmitter e, java.util.List constructors, ObjectSwitchCallback callback)static voidfactory_method(ClassEmitter ce, Signature sig)static voidhash_code(CodeEmitter e, org.objectweb.asm.Type type, int multiplier, Customizer customizer)Deprecated.static voidhash_code(CodeEmitter e, org.objectweb.asm.Type type, int multiplier, CustomizerRegistry registry)static voidload_class(CodeEmitter e, org.objectweb.asm.Type type)static voidload_class_this(CodeEmitter e)static voidload_method(CodeEmitter e, MethodInfo method)static voidmethod_switch(CodeEmitter e, java.util.List methods, ObjectSwitchCallback callback)static voidnot_equals(CodeEmitter e, org.objectweb.asm.Type type, org.objectweb.asm.Label notEquals, Customizer customizer)Deprecated.static voidnot_equals(CodeEmitter e, org.objectweb.asm.Type type, org.objectweb.asm.Label notEquals, CustomizerRegistry registry)Branches to the specified label if the top two items on the stack are not equal.static voidnull_constructor(ClassEmitter ce)static voidprocess_array(CodeEmitter e, org.objectweb.asm.Type type, ProcessArrayCallback callback)Process an array on the stack.static voidprocess_arrays(CodeEmitter e, org.objectweb.asm.Type type, ProcessArrayCallback callback)Process two arrays on the stack in parallel.static voidpush_array(CodeEmitter e, java.lang.Object[] array)static voidpush_object(CodeEmitter e, java.lang.Object obj)static voidstring_switch(CodeEmitter e, java.lang.String[] strings, int switchStyle, ObjectSwitchCallback callback)static voidwrap_throwable(Block block, org.objectweb.asm.Type wrapper)static voidwrap_undeclared_throwable(CodeEmitter e, Block handler, org.objectweb.asm.Type[] exceptions, org.objectweb.asm.Type wrapper)
-
-
-
Field Detail
-
DEFAULT_DELIMITERS
public static final EmitUtils.ArrayDelimiters DEFAULT_DELIMITERS
-
-
Method Detail
-
factory_method
public static void factory_method(ClassEmitter ce, Signature sig)
-
null_constructor
public static void null_constructor(ClassEmitter ce)
-
process_array
public static void process_array(CodeEmitter e, org.objectweb.asm.Type type, ProcessArrayCallback callback)
Process an array on the stack. Assumes the top item on the stack is an array of the specified type. For each element in the array, puts the element on the stack and triggers the callback.- Parameters:
type- the type of the array (type.isArray() must be true)callback- the callback triggered for each element
-
process_arrays
public static void process_arrays(CodeEmitter e, org.objectweb.asm.Type type, ProcessArrayCallback callback)
Process two arrays on the stack in parallel. Assumes the top two items on the stack are arrays of the specified class. The arrays must be the same length. For each pair of elements in the arrays, puts the pair on the stack and triggers the callback.- Parameters:
type- the type of the arrays (type.isArray() must be true)callback- the callback triggered for each pair of elements
-
string_switch
public static void string_switch(CodeEmitter e, java.lang.String[] strings, int switchStyle, ObjectSwitchCallback callback)
-
load_class_this
public static void load_class_this(CodeEmitter e)
-
load_class
public static void load_class(CodeEmitter e, org.objectweb.asm.Type type)
-
push_array
public static void push_array(CodeEmitter e, java.lang.Object[] array)
-
push_object
public static void push_object(CodeEmitter e, java.lang.Object obj)
-
hash_code
@Deprecated public static void hash_code(CodeEmitter e, org.objectweb.asm.Type type, int multiplier, Customizer customizer)
Deprecated.
-
hash_code
public static void hash_code(CodeEmitter e, org.objectweb.asm.Type type, int multiplier, CustomizerRegistry registry)
-
not_equals
@Deprecated public static void not_equals(CodeEmitter e, org.objectweb.asm.Type type, org.objectweb.asm.Label notEquals, Customizer customizer)
Deprecated.
-
not_equals
public static void not_equals(CodeEmitter e, org.objectweb.asm.Type type, org.objectweb.asm.Label notEquals, CustomizerRegistry registry)
Branches to the specified label if the top two items on the stack are not equal. The items must both be of the specified class. Equality is determined by comparing primitive values directly and by invoking theequalsmethod for Objects. Arrays are recursively processed in the same manner.
-
append_string
@Deprecated public static void append_string(CodeEmitter e, org.objectweb.asm.Type type, EmitUtils.ArrayDelimiters delims, Customizer customizer)
Deprecated.
-
append_string
public static void append_string(CodeEmitter e, org.objectweb.asm.Type type, EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry)
-
load_method
public static void load_method(CodeEmitter e, MethodInfo method)
-
method_switch
public static void method_switch(CodeEmitter e, java.util.List methods, ObjectSwitchCallback callback)
-
constructor_switch
public static void constructor_switch(CodeEmitter e, java.util.List constructors, ObjectSwitchCallback callback)
-
wrap_throwable
public static void wrap_throwable(Block block, org.objectweb.asm.Type wrapper)
-
add_properties
public static void add_properties(ClassEmitter ce, java.lang.String[] names, org.objectweb.asm.Type[] types)
-
add_property
public static void add_property(ClassEmitter ce, java.lang.String name, org.objectweb.asm.Type type, java.lang.String fieldName)
-
wrap_undeclared_throwable
public static void wrap_undeclared_throwable(CodeEmitter e, Block handler, org.objectweb.asm.Type[] exceptions, org.objectweb.asm.Type wrapper)
-
begin_method
public static CodeEmitter begin_method(ClassEmitter e, MethodInfo method)
-
begin_method
public static CodeEmitter begin_method(ClassEmitter e, MethodInfo method, int access)
-
-