public class EmitUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EmitUtils.ArrayDelimiters |
Modifier and Type | Field and Description |
---|---|
static EmitUtils.ArrayDelimiters |
DEFAULT_DELIMITERS |
Modifier and Type | Method and Description |
---|---|
static 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) |
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) |
static void |
load_class_this(CodeEmitter e) |
static void |
load_class(CodeEmitter e,
Type type) |
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)
Branches to the specified label if the top two items on the stack
are not equal.
|
static void |
null_constructor(ClassEmitter ce) |
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) |
public static final EmitUtils.ArrayDelimiters DEFAULT_DELIMITERS
public static void factory_method(ClassEmitter ce, Signature sig)
public static void null_constructor(ClassEmitter ce)
public static void process_array(CodeEmitter e, Type type, ProcessArrayCallback callback)
type
- the type of the array (type.isArray() must be true)callback
- the callback triggered for each elementpublic static void process_arrays(CodeEmitter e, Type type, ProcessArrayCallback callback)
type
- the type of the arrays (type.isArray() must be true)callback
- the callback triggered for each pair of elementspublic static void string_switch(CodeEmitter e, String[] strings, int switchStyle, ObjectSwitchCallback callback)
public static void load_class_this(CodeEmitter e)
public static void load_class(CodeEmitter e, Type type)
public static void push_array(CodeEmitter e, Object[] array)
public static void push_object(CodeEmitter e, Object obj)
public static void hash_code(CodeEmitter e, Type type, int multiplier, Customizer customizer)
public static void not_equals(CodeEmitter e, Type type, Label notEquals, Customizer customizer)
equals
method for
Objects. Arrays are recursively processed in the same manner.public static void append_string(CodeEmitter e, Type type, EmitUtils.ArrayDelimiters delims, Customizer customizer)
public static void load_method(CodeEmitter e, MethodInfo method)
public static void method_switch(CodeEmitter e, List methods, ObjectSwitchCallback callback)
public static void constructor_switch(CodeEmitter e, List constructors, ObjectSwitchCallback callback)
public static void add_properties(ClassEmitter ce, String[] names, Type[] types)
public static void add_property(ClassEmitter ce, String name, Type type, String fieldName)
public static void wrap_undeclared_throwable(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper)
public static CodeEmitter begin_method(ClassEmitter e, MethodInfo method)
public static CodeEmitter begin_method(ClassEmitter e, MethodInfo method, int access)
Copyright © 2018. All rights reserved.