类的使用
cn.taketoday.bytecode.Type
使用Type的程序包
程序包
说明
CGLIB or ASM other byte code library
Provides some useful class and method adapters.
Provides a framework for static code analysis based on the asm.tree package.
Core support package for type introspection.
-
cn.taketoday.bytecode中Type的使用
声明为Type的cn.taketoday.bytecode中的字段修饰符和类型字段说明static final TypeType.BOOLEAN_TYPEThebooleantype.static final TypeType.BYTE_TYPEThebytetype.static final TypeType.CHAR_TYPEThechartype.static final TypeType.DOUBLE_TYPEThedoubletype.static final Type[]Type.EMPTY_ARRAYstatic final TypeType.FLOAT_TYPEThefloattype.static final TypeType.INT_TYPETheinttype.static final TypeType.LONG_TYPEThelongtype.static final TypeType.SHORT_TYPETheshorttype.static final TypeType.TYPE_BOOLEANstatic final TypeType.TYPE_BYTEstatic final TypeType.TYPE_CHARACTERstatic final TypeType.TYPE_CLASSstatic final TypeType.TYPE_CLASS_ARRAYstatic final TypeType.TYPE_CLASS_LOADERstatic final TypeType.TYPE_CONSTANTstatic final TypeType.TYPE_DOUBLEstatic final TypeType.TYPE_ERRORstatic final TypeType.TYPE_FLOATstatic final TypeType.TYPE_INTEGERstatic final TypeType.TYPE_LONGstatic final TypeType.TYPE_NUMBERstatic final TypeType.TYPE_OBJECTThe type of the java.lang.Object class.static final TypeType.TYPE_OBJECT_ARRAYstatic final Typestatic final TypeType.TYPE_SHORTstatic final TypeType.TYPE_SIGNATUREstatic final TypeType.TYPE_STRINGstatic final TypeType.TYPE_STRING_ARRAYstatic final TypeType.TYPE_STRING_BUFFERstatic final TypeType.TYPE_SYSTEMstatic final TypeType.TYPE_THROWABLEstatic final TypeType.TYPE_TYPEstatic final TypeType.VOID_TYPEThevoidtype.返回Type的cn.taketoday.bytecode中的方法修饰符和类型方法说明static Type[]static Type[]static Type[]static Type[]ToTypearraystatic TypeType.forReturnType(Method method) Returns theTypecorresponding to the return type of the given method.static TypeType.forReturnType(String methodDescriptor) Returns theTypecorresponding to the return type of the given method descriptor.static TypeReturns theTypecorresponding to the given class.static TypeType.fromConstructor(Constructor<?> constructor) Returns the methodTypecorresponding to the given constructor.static TypeType.fromDescriptor(String typeDescriptor) Returns theTypecorresponding to the given type descriptor.static TypeType.fromInternalName(String internalName) Returns theTypecorresponding to the given internal name.static Type[]Type.fromInternalNames(String[] names) static TypeType.fromMethod(Type returnType, Type... argumentTypes) Returns the methodTypecorresponding to the given argument and return types.static TypeType.fromMethod(Method method) Returns the methodTypecorresponding to the given method.static TypeType.fromMethod(String methodDescriptor) Returns theTypecorresponding to the given method descriptor.Type[]Type.getArgumentTypes()Returns the argument types of methods of this type.static Type[]Type.getArgumentTypes(Method method) Returns theTypevalues corresponding to the argument types of the given method.static Type[]Type.getArgumentTypes(String methodDescriptor) Returns theTypevalues corresponding to the argument types of the given method descriptor.Type.getBoxedType()get Boxed TypeType.getComponentType()ClassValueHolder.getDescriptor()Type.getElementType()Returns the type of the elements of this array type.static Type[]Type.getExceptionTypes(Member member) static Type[]Type.getObjectTypes(String[] internalNames) Returns theTypes corresponding to the given internal name.Type.getReturnType()Returns the return type of methods of this type.static Type[]static Type[]Type.getUnboxedType()static Type参数类型为Type的cn.taketoday.bytecode中的方法修饰符和类型方法说明static Type[]static Type[]static Type[]static Type[]ToTypearraystatic TypeType.fromMethod(Type returnType, Type... argumentTypes) Returns the methodTypecorresponding to the given argument and return types.static StringType.getMethodDescriptor(Type returnType, Type... argumentTypes) Returns the descriptor corresponding to the given argument and return types.static intType.getStackSize(Type[] types) static String[]Type.toInternalNames(Type... types) 参数类型为Type的cn.taketoday.bytecode中的构造器 -
cn.taketoday.bytecode.commons中Type的使用
修饰符和类型字段说明protected final Type[]LocalVariablesSorter.argumentTypesThe argument types of the visited method.final TypeLocal.type修饰符和类型方法说明Type[]LocalVariablesSorter.cloneArgumentTypes()Type[]LocalVariablesSorter.getArgumentTypes()Type[]MethodSignature.getArgumentTypes()Returns the argument types of the method described by this object.GeneratorAdapter.getLocalType(int local) Returns the type of the given local variable.GeneratorAdapter.getReturnType()MethodSignature.getReturnType()Returns the return type of the method described by this object.参数类型为Type的cn.taketoday.bytecode.commons中的方法修饰符和类型方法说明voidvoidvoidvoidvoidvoidGenerates the instruction to load an element from an array.voidGeneratorAdapter.arrayStore(Type type) Generates the instruction to store an element in an array.voidvoidGenerates the instructions to box the top stack value.voidGenerates the instructions to cast a numerical value from one type to another.static voidInstructionAdapter.cast(MethodVisitor methodVisitor, Type from, Type to) Generates the instruction to cast from the first given type to the other.voidGenerates the instruction to cast from the first given type to the other.voidGeneratorAdapter.catchException(Label start, Label end, Type exception) Marks the start of an exception handler.voidvoidGenerates the instruction to check that the top stack value is of the given type.voidvoidvoidvoidGenerates a get field or set field instruction.static MethodSignatureMethodSignature.forConstructor(Type... parameterTypes) voidGenerates the instruction to push the value of a non static field on the stack.voidGenerates the instruction to push the value of a static field on the stack.voidGenerates the instructions to jump to a label based on the comparison of the top two stack values.voidGeneratorAdapter.instanceOf(Type type) Generates the instruction to test if the top stack value is of the given type.voidInstructionAdapter.instanceOf(Type type) voidGeneratorAdapter.invokeConstructor(Type type) Generates the instruction to invoke a default constructor.voidGeneratorAdapter.invokeConstructor(Type type, MethodSignature method) Generates the instruction to invoke a constructor.voidGeneratorAdapter.invokeInsn(int opcode, Type type, MethodSignature method, boolean isInterface) Generates an invoke method instruction.voidGeneratorAdapter.invokeInterface(Type owner, MethodSignature method) Generates the instruction to invoke an interface method.voidGeneratorAdapter.invokeStatic(Type owner, MethodSignature method) Generates the instruction to invoke a static method.voidGeneratorAdapter.invokeVirtual(Type owner, MethodSignature method) Generates the instruction to invoke a normal method.voidvoidGenerates the instruction to push a local variable on the stack.voidGenerates the instruction to load the given local variable on the stack.voidGenerates the instruction to do the specified mathematical or logical operation.voidvoidvoidGenerates the instruction to create a new array.static voidInstructionAdapter.newArray(MethodVisitor methodVisitor, Type type) Generates the instruction to create and push on the stack an array of the given type.voidGenerates the instruction to create and push on the stack an array of the given type.voidGeneratorAdapter.newInstance(Type type) Generates the instruction to create a new object.intLocalVariablesSorter.newLocalIndex(Type type) Constructs a new local variable of the given type.protected intLocalVariablesSorter.newLocalMapping(Type type) voidvoidGenerates the instruction to push the given value on the stack.voidGenerates the instruction to store the top stack value in a non static field.voidGenerates the instruction to store the top stack value in a static field.voidprotected voidGeneratorAdapter.setLocalType(int local, Type type) protected voidLocalVariablesSorter.setLocalType(int local, Type type) Notifies subclasses that a local variable has been added or remapped.voidvoidvoidvoidGenerates the instruction to store the top stack value in a local variable.voidGeneratorAdapter.storeLocal(int local, Type type) Generates the instruction to store the top stack value in the given local variable.voidvoidGenerates the instructions to swap the top two stack values.voidGenerates the instruction to push the given type on the stack.voidGeneratorAdapter.throwException(Type type, String message) Generates the instructions to create and throw an exception.protected voidGenerates a type dependent instruction.voidGenerates the instructions to unbox the top stack value.voidvoidGenerates the instructions to box the top stack value using Java 5's valueOf() method.void参数类型为Type的cn.taketoday.bytecode.commons中的构造器限定符构造器说明GeneratorAdapter(int access, MethodSignature method, String signature, Type[] exceptions, ClassVisitor classVisitor) Constructs a newGeneratorAdapter.LocalVariablesSorter(int access, Type[] argumentTypes, MethodVisitor methodVisitor) MethodSignature(Type returnType, String name, Type... argumentTypes) Constructs a newMethodSignature. -
cn.taketoday.bytecode.core中Type的使用
声明为Type的cn.taketoday.bytecode.core中的字段修饰符和类型字段说明static final TypeEmitUtils.TYPE_BIG_DECIMALstatic final TypeEmitUtils.TYPE_BIG_INTEGER修饰符和类型方法说明ClassEmitter.getClassType()abstract Type[]MethodInfo.getExceptionTypes()Type[]SimpleMethodInfo.getExceptionTypes()abstract Type[]ClassInfo.getInterfaces()FieldTypeCustomizer.getOutType(int index, Type type) Computes type of field for storing given parameterClassEmitter.getSuperType()abstract TypeClassInfo.getSuperType()abstract TypeClassInfo.getType()参数类型为Type的cn.taketoday.bytecode.core中的方法修饰符和类型方法说明static voidEmitUtils.addProperties(ClassEmitter ce, String[] names, Type[] types) static voidEmitUtils.addProperty(ClassEmitter ce, String name, Type type, String fieldName) static voidEmitUtils.appendString(CodeEmitter e, Type type, cn.taketoday.bytecode.core.EmitUtils.ArrayDelimiters delims, CustomizerRegistry registry) voidClassEmitter.beginClass(int version, int access, String className, Type superType, Type[] interfaces, String source) voidClassEmitter.beginClass(int version, int access, String className, Type superType, String source, Type... interfaces) ClassEmitter.beginMethod(int access, MethodSignature sig, Type... exceptions) voidCodeEmitter.catchException(Block block, Type exception) voidCustomizer.customize(GeneratorAdapter e, Type type) voidFieldTypeCustomizer.customize(CodeEmitter e, int index, Type type) Customizesthis.FIELD_0 = ?assignment in key constructorbooleanHashCodeCustomizer.customize(GeneratorAdapter e, Type type) Customizes calculation of hashcodevoidClassEmitter.declare_field(int access, String name, Type type, Object value) FieldTypeCustomizer.getOutType(int index, Type type) Computes type of field for storing given parameterstatic voidEmitUtils.hashCode(GeneratorAdapter e, Type type, int multiplier, Customizer customizer) 已过时。static voidEmitUtils.hashCode(GeneratorAdapter e, Type type, int multiplier, CustomizerRegistry registry) voidCodeEmitter.invoke(MethodInfo method, Type virtualType) voidCodeEmitter.invokeStatic(Type owner, MethodSignature sig, boolean isInterface) static voidEmitUtils.loadClass(CodeEmitter e, Type type) static voidEmitUtils.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.static voidEmitUtils.processArray(GeneratorAdapter e, Type type, ProcessArrayCallback callback) Process an array on the stack.static voidEmitUtils.processArrays(CodeEmitter e, Type type, ProcessArrayCallback callback) Process two arrays on the stack in parallel.voidProcessArrayCallback.processElement(Type type) voidCodeEmitter.super_getfield(String name, Type type) voidCodeEmitter.super_getstatic(String name, Type type) voidCodeEmitter.super_putfield(String name, Type type) voidCodeEmitter.super_putstatic(String name, Type type) voidCodeEmitter.unbox_or_zero(Type type) Unboxes the object on the top of the stack.static voidEmitUtils.wrapThrowable(Block block, Type wrapper) static voidEmitUtils.wrapUndeclaredThrowable(CodeEmitter e, Block handler, Type[] exceptions, Type wrapper) voidCodeEmitter.zero_or_null(Type type) Pushes a zero onto the stack if the argument is a primitive class, or a null otherwise.参数类型为Type的cn.taketoday.bytecode.core中的构造器限定符构造器说明SimpleMethodInfo(ClassInfo classInfo, int access, MethodSignature sig, Type[] exceptionTypes) -
cn.taketoday.bytecode.proxy中Type的使用
参数类型为Type的cn.taketoday.bytecode.proxy中的方法修饰符和类型方法说明voidInterfaceMaker.add(MethodSignature sig, Type[] exceptions) Add a method signature to the interface. -
cn.taketoday.bytecode.transform.impl中Type的使用
参数类型为Type的cn.taketoday.bytecode.transform.impl中的方法修饰符和类型方法说明booleanInterceptFieldFilter.acceptRead(Type owner, String name) booleanInterceptFieldFilter.acceptWrite(Type owner, String name) voidAddDelegateTransformer.beginClass(int version, int access, String className, Type superType, Type[] interfaces, String sourceFile) voidInterceptFieldTransformer.beginClass(int version, int access, String className, Type superType, Type[] interfaces, String sourceFile) AddDelegateTransformer.beginMethod(int access, MethodSignature sig, Type... exceptions) AddInitTransformer.beginMethod(int access, MethodSignature sig, Type... exceptions) InterceptFieldTransformer.beginMethod(int access, MethodSignature sig, Type... exceptions) UndeclaredThrowableTransformer.beginMethod(int access, MethodSignature sig, Type... exceptions) voidAccessFieldTransformer.declare_field(int access, String name, Type type, Object value) voidInterceptFieldTransformer.declare_field(int access, String name, Type type, Object value) AccessFieldTransformer.Callback.getPropertyName(Type owner, String fieldName) 参数类型为Type的cn.taketoday.bytecode.transform.impl中的构造器类型变量类型为Type的cn.taketoday.bytecode.transform.impl中的构造器参数 -
cn.taketoday.bytecode.tree.analysis中Type的使用
修饰符和类型方法说明protected TypeSimpleVerifier.getSuperClass(Type type) Returns the type corresponding to the super class of the given type.BasicValue.getType()Returns theTypeof this value.参数类型为Type的cn.taketoday.bytecode.tree.analysis中的方法修饰符和类型方法说明protected Class<?>Loads the class corresponding to the given type.protected TypeSimpleVerifier.getSuperClass(Type type) Returns the type corresponding to the super class of the given type.protected booleanSimpleVerifier.isAssignableFrom(Type type1, Type type2) Returns whether the class corresponding to the first argument is either the same as, or is a superclass or superinterface of the class corresponding to the second argument.protected booleanSimpleVerifier.isInterface(Type type) Returns whether the given type corresponds to the type of an interface.Interpreter.newExceptionValue(TryCatchBlockNode tryCatchBlockNode, Frame<V> handlerFrame, Type exceptionType) Creates a new value that represents the given exception type.Interpreter.newParameterValue(boolean isInstanceMethod, int local, Type type) Creates a new value that represents the given parameter type.Interpreter.newReturnTypeValue(Type type) Creates a new value that represents the given return type.abstract VCreates a new value that represents the given type.参数类型为Type的cn.taketoday.bytecode.tree.analysis中的构造器限定符构造器说明BasicValue(Type type) Constructs a newBasicValueof the given type.SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface) Constructs a newSimpleVerifierto verify a specific class.SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface, Type... currentClassInterfaces) Constructs a newSimpleVerifierto verify a specific class. -
cn.taketoday.core.type中Type的使用
返回Type的cn.taketoday.core.type中的方法修饰符和类型方法说明Type[]MethodMetadata.getArgumentTypes()Type[]StandardMethodMetadata.getArgumentTypes()
EmitUtils.hashCode(GeneratorAdapter, Type, int, CustomizerRegistry)instead