类 EmitUtils
java.lang.Object
cn.taketoday.bytecode.core.EmitUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaddProperties(ClassEmitter ce, String[] names, Type[] types) static voidaddProperty(ClassEmitter ce, String name, Type type, String fieldName) static voidappendString(CodeEmitter e, Type type, cn.taketoday.bytecode.core.EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry) static CodeEmitterbeginMethod(ClassEmitter e, MethodInfo method) static CodeEmitterbeginMethod(ClassEmitter e, MethodInfo method, int access) static voidconstructorSwitch(CodeEmitter e, List constructors, ObjectSwitchCallback callback) static StringescapeType(String s) static voidfactoryMethod(ClassEmitter ce, MethodSignature sig) protected static <T> int[]getSwitchKeys(Map<Integer, List<T>> buckets) static voidhashCode(GeneratorAdapter e, Type type, int multiplier, Customizer customizer) 已过时。static voidhashCode(GeneratorAdapter e, Type type, int multiplier, CustomizerRegistry registry) static voidloadClass(CodeEmitter e, Type type) static voidstatic voidloadEmptyArguments(CodeEmitter codeEmitter) static voidloadMethod(CodeEmitter e, MethodInfo method) static voidmethodSwitch(CodeEmitter e, List methods, ObjectSwitchCallback callback) static voidnotEquals(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 voidstatic voidprocessArray(GeneratorAdapter e, Type type, ProcessArrayCallback callback) Process an array on the stack.static voidprocessArrays(CodeEmitter e, Type type, ProcessArrayCallback callback) Process two arrays on the stack in parallel.static voidpushArray(CodeEmitter e, Object[] array) static voidpushObject(CodeEmitter e, Object obj) static voidstringSwitch(CodeEmitter e, String[] strings, int switchStyle, ObjectSwitchCallback callback) static voidwrapThrowable(Block block, Type wrapper) static voidwrapUndeclaredThrowable(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper)
-
字段详细资料
-
TYPE_BIG_INTEGER
-
TYPE_BIG_DECIMAL
-
DEFAULT_DELIMITERS
public static final cn.taketoday.bytecode.core.EmitUtils.ArrayDelimiters DEFAULT_DELIMITERS
-
-
构造器详细资料
-
EmitUtils
public EmitUtils()
-
-
方法详细资料
-
factoryMethod
-
nullConstructor
-
processArray
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.- 参数:
type- the type of the array (type.isArray() must be true)callback- the callback triggered for each element
-
processArrays
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.- 参数:
type- the type of the arrays (type.isArray() must be true)callback- the callback triggered for each pair of elements
-
stringSwitch
public static void stringSwitch(CodeEmitter e, String[] strings, int switchStyle, ObjectSwitchCallback callback) -
getSwitchKeys
-
loadClassThis
-
loadClass
-
pushArray
-
pushObject
-
hashCode
@Deprecated public static void hashCode(GeneratorAdapter e, Type type, int multiplier, Customizer customizer) 已过时。 -
hashCode
public static void hashCode(GeneratorAdapter e, Type type, int multiplier, CustomizerRegistry registry) -
notEquals
public static void notEquals(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 theequalsmethod for Objects. Arrays are recursively processed in the same manner. -
appendString
public static void appendString(CodeEmitter e, Type type, cn.taketoday.bytecode.core.EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry) -
loadMethod
-
methodSwitch
-
constructorSwitch
public static void constructorSwitch(CodeEmitter e, List constructors, ObjectSwitchCallback callback) -
wrapThrowable
-
addProperties
-
addProperty
-
wrapUndeclaredThrowable
public static void wrapUndeclaredThrowable(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper) -
beginMethod
-
beginMethod
-
loadEmptyArguments
-
escapeType
-
hashCode(GeneratorAdapter, Type, int, CustomizerRegistry)instead