Package org.springframework.cglib.core
Class EmitUtils
java.lang.Object
org.springframework.cglib.core.EmitUtils
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
add_properties
(ClassEmitter ce, String[] names, Type[] types) static void
add_property
(ClassEmitter ce, String name, Type type, String fieldName) static void
append_string
(CodeEmitter e, Type type, EmitUtils.ArrayDelimiters delims, Customizer customizer) Deprecated.static void
append_string
(CodeEmitter e, Type type, EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry) static CodeEmitter
begin_method
(ClassEmitter e, MethodInfo method) static CodeEmitter
begin_method
(ClassEmitter e, MethodInfo method, int access) static void
constructor_switch
(CodeEmitter e, List constructors, ObjectSwitchCallback callback) static void
factory_method
(ClassEmitter ce, Signature sig) static void
hash_code
(CodeEmitter e, Type type, int multiplier, Customizer customizer) Deprecated.static void
hash_code
(CodeEmitter e, Type type, int multiplier, CustomizerRegistry registry) static void
load_class
(CodeEmitter e, Type type) static void
static void
load_method
(CodeEmitter e, MethodInfo method) static void
method_switch
(CodeEmitter e, List methods, ObjectSwitchCallback callback) static void
not_equals
(CodeEmitter e, Type type, Label notEquals, Customizer customizer) Deprecated.static void
not_equals
(CodeEmitter e, Type type, Label notEquals, CustomizerRegistry registry) Branches to the specified label if the top two items on the stack are not equal.static void
static void
process_array
(CodeEmitter e, Type type, ProcessArrayCallback callback) Process an array on the stack.static void
process_arrays
(CodeEmitter e, Type type, ProcessArrayCallback callback) Process two arrays on the stack in parallel.static void
push_array
(CodeEmitter e, Object[] array) static void
push_object
(CodeEmitter e, Object obj) static void
string_switch
(CodeEmitter e, String[] strings, int switchStyle, ObjectSwitchCallback callback) static void
wrap_throwable
(Block block, Type wrapper) static void
wrap_undeclared_throwable
(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper)
-
Field Details
-
DEFAULT_DELIMITERS
-
-
Method Details
-
factory_method
-
null_constructor
-
process_array
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
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, String[] strings, int switchStyle, ObjectSwitchCallback callback) -
load_class_this
-
load_class
-
push_array
-
push_object
-
hash_code
@Deprecated public static void hash_code(CodeEmitter e, Type type, int multiplier, Customizer customizer) Deprecated. -
hash_code
-
not_equals
@Deprecated public static void not_equals(CodeEmitter e, Type type, Label notEquals, Customizer customizer) Deprecated. -
not_equals
public static void not_equals(CodeEmitter e, Type type, 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 theequals
method for Objects. Arrays are recursively processed in the same manner. -
append_string
@Deprecated public static void append_string(CodeEmitter e, Type type, EmitUtils.ArrayDelimiters delims, Customizer customizer) Deprecated. -
append_string
public static void append_string(CodeEmitter e, Type type, EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry) -
load_method
-
method_switch
-
constructor_switch
public static void constructor_switch(CodeEmitter e, List constructors, ObjectSwitchCallback callback) -
wrap_throwable
-
add_properties
-
add_property
-
wrap_undeclared_throwable
public static void wrap_undeclared_throwable(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper) -
begin_method
-
begin_method
-
append_string(CodeEmitter, Type, ArrayDelimiters, CustomizerRegistry)
instead