类的使用
org.springframework.asm.MethodVisitor
使用MethodVisitor的程序包 程序包 说明 org.springframework.asm Spring's repackaging of ASM 7.0 (with Spring-specific patches; for internal use only).org.springframework.context.expression Expression parsing support within a Spring application context.org.springframework.core.type.classreading Support classes for reading annotation and class-level metadata.org.springframework.expression.spel SpEL's central implementation package.org.springframework.expression.spel.ast SpEL's abstract syntax tree.org.springframework.expression.spel.support SpEL's default implementations for various core abstractions.org.springframework.asm中MethodVisitor的使用
声明为MethodVisitor的org.springframework.asm中的字段 修饰符和类型 字段 说明 protected MethodVisitorMethodVisitor. mvThe method visitor to which this visitor must delegate method calls.返回MethodVisitor的org.springframework.asm中的方法 修饰符和类型 方法 说明 MethodVisitorClassVisitor. visitMethod(int access, String name, String descriptor, String signature, String[] exceptions)Visits a method of the class.MethodVisitorClassWriter. visitMethod(int access, String name, String descriptor, String signature, String[] exceptions)参数类型为MethodVisitor的org.springframework.asm中的构造器 构造器 说明 MethodVisitor(int api, MethodVisitor methodVisitor)Constructs a newMethodVisitor.org.springframework.context.expression中MethodVisitor的使用
参数类型为MethodVisitor的org.springframework.context.expression中的方法 修饰符和类型 方法 说明 voidMapAccessor. generateCode(String propertyName, MethodVisitor mv, CodeFlow cf)org.springframework.core.type.classreading中MethodVisitor的使用
org.springframework.core.type.classreading中MethodVisitor的子类 修饰符和类型 类 说明 classMethodMetadataReadingVisitor已过时。As of Spring Framework 5.2, this class and related classes in this package have been replaced bySimpleAnnotationMetadataReadingVisitorand related classes for internal use within the framework.返回MethodVisitor的org.springframework.core.type.classreading中的方法 修饰符和类型 方法 说明 MethodVisitorAnnotationMetadataReadingVisitor. visitMethod(int access, String name, String desc, String signature, String[] exceptions)已过时。org.springframework.expression.spel中MethodVisitor的使用
参数类型为MethodVisitor的org.springframework.expression.spel中的方法 修饰符和类型 方法 说明 voidCodeFlow.ClinitAdder. generateCode(MethodVisitor mv, CodeFlow codeflow)voidCompilablePropertyAccessor. generateCode(String propertyName, MethodVisitor mv, CodeFlow cf)Generate the bytecode the performs the access operation into the specified MethodVisitor using context information from the codeflow where necessary.static voidCodeFlow. insertAnyNecessaryTypeConversionBytecodes(MethodVisitor mv, char targetDescriptor, String stackDescriptor)Insert any necessary numeric conversion bytecodes based upon what is on the stack and the desired target type.static voidCodeFlow. insertArrayStore(MethodVisitor mv, String arrayElementType)Produce appropriate bytecode to store a stack item in an array.static voidCodeFlow. insertBoxIfNecessary(MethodVisitor mv, char ch)Determine the appropriate boxing instruction for a specific type (if it needs boxing) and insert the instruction into the supplied visitor.static voidCodeFlow. insertBoxIfNecessary(MethodVisitor mv, String descriptor)Determine the appropriate boxing instruction for a specific type (if it needs boxing) and insert the instruction into the supplied visitor.static voidCodeFlow. insertCheckCast(MethodVisitor mv, String descriptor)Insert the appropriate CHECKCAST instruction for the supplied descriptor.static voidCodeFlow. insertNewArrayCode(MethodVisitor mv, int size, String arraytype)Produce the correct bytecode to build an array.static voidCodeFlow. insertNumericUnboxOrPrimitiveTypeCoercion(MethodVisitor mv, String stackDescriptor, char targetDescriptor)For use in mathematical operators, handles converting from a (possibly boxed) number on the stack to a primitive numeric type.static voidCodeFlow. insertOptimalLoad(MethodVisitor mv, int value)Create the optimal instruction for loading a number on the stack.static voidCodeFlow. insertUnboxInsns(MethodVisitor mv, char ch, String stackDescriptor)Insert any necessary cast and value call to convert from a boxed type to a primitive value.static voidCodeFlow. insertUnboxNumberInsns(MethodVisitor mv, char targetDescriptor, String stackDescriptor)For numbers, use the appropriate method on the number to convert it to the primitive type requested.voidCodeFlow. loadEvaluationContext(MethodVisitor mv)Push the bytecode to load the EvaluationContext (the second parameter passed to the compiled expression method).voidCodeFlow. loadTarget(MethodVisitor mv)Push the byte code to load the target (i.e. what was passed as the first argument to CompiledExpression.getValue(target, context))voidCodeFlow. unboxBooleanIfNecessary(MethodVisitor mv)If the codeflow shows the last expression evaluated to java.lang.Boolean then insert the necessary instructions to unbox that to a boolean primitive.org.springframework.expression.spel.ast中MethodVisitor的使用
参数类型为MethodVisitor的org.springframework.expression.spel.ast中的方法 修饰符和类型 方法 说明 voidBooleanLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidCompoundExpression. generateCode(MethodVisitor mv, CodeFlow cf)voidConstructorReference. generateCode(MethodVisitor mv, CodeFlow cf)voidElvis. generateCode(MethodVisitor mv, CodeFlow cf)voidFloatLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidFunctionReference. generateCode(MethodVisitor mv, CodeFlow cf)voidIndexer. generateCode(MethodVisitor mv, CodeFlow cf)voidInlineList. generateCode(MethodVisitor mv, CodeFlow codeflow)voidIntLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidLongLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidMethodReference. generateCode(MethodVisitor mv, CodeFlow cf)voidNullLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidOpAnd. generateCode(MethodVisitor mv, CodeFlow cf)voidOpDivide. generateCode(MethodVisitor mv, CodeFlow cf)voidOpEQ. generateCode(MethodVisitor mv, CodeFlow cf)voidOperatorInstanceof. generateCode(MethodVisitor mv, CodeFlow cf)voidOperatorNot. generateCode(MethodVisitor mv, CodeFlow cf)voidOpGE. generateCode(MethodVisitor mv, CodeFlow cf)voidOpGT. generateCode(MethodVisitor mv, CodeFlow cf)voidOpLE. generateCode(MethodVisitor mv, CodeFlow cf)voidOpLT. generateCode(MethodVisitor mv, CodeFlow cf)voidOpMinus. generateCode(MethodVisitor mv, CodeFlow cf)voidOpModulus. generateCode(MethodVisitor mv, CodeFlow cf)voidOpMultiply. generateCode(MethodVisitor mv, CodeFlow cf)voidOpNE. generateCode(MethodVisitor mv, CodeFlow cf)voidOpOr. generateCode(MethodVisitor mv, CodeFlow cf)voidOpPlus. generateCode(MethodVisitor mv, CodeFlow cf)voidPropertyOrFieldReference. generateCode(MethodVisitor mv, CodeFlow cf)voidRealLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidSpelNodeImpl. generateCode(MethodVisitor mv, CodeFlow cf)Generate the bytecode for this node into the supplied visitor.voidStringLiteral. generateCode(MethodVisitor mv, CodeFlow cf)voidTernary. generateCode(MethodVisitor mv, CodeFlow cf)voidTypeReference. generateCode(MethodVisitor mv, CodeFlow cf)voidVariableReference. generateCode(MethodVisitor mv, CodeFlow cf)protected static voidSpelNodeImpl. generateCodeForArgument(MethodVisitor mv, CodeFlow cf, SpelNodeImpl argument, String paramDesc)Ask an argument to generate its bytecode and then follow it up with any boxing/unboxing/checkcasting to ensure it matches the expected parameter descriptor.protected static voidSpelNodeImpl. generateCodeForArguments(MethodVisitor mv, CodeFlow cf, Member member, SpelNodeImpl[] arguments)Generate code that handles building the argument values for the specified method.protected voidOperator. generateComparisonCode(MethodVisitor mv, CodeFlow cf, int compInstruction1, int compInstruction2)Numeric comparison operators share very similar generated code, only differing in two comparison instructions.org.springframework.expression.spel.support中MethodVisitor的使用
参数类型为MethodVisitor的org.springframework.expression.spel.support中的方法 修饰符和类型 方法 说明 voidReflectivePropertyAccessor.OptimalPropertyAccessor. generateCode(String propertyName, MethodVisitor mv, CodeFlow cf)