接口 CompilablePropertyAccessor

所有超级接口:
Opcodes, PropertyAccessor
所有已知实现类:
ReflectivePropertyAccessor.OptimalPropertyAccessor

public interface CompilablePropertyAccessor extends PropertyAccessor, Opcodes
A compilable property accessor is able to generate bytecode that represents the access operation, facilitating compilation to bytecode of expressions that use the accessor.
从以下版本开始:
4.0
作者:
Andy Clement, Harry Yang
  • 方法详细资料

    • isCompilable

      boolean isCompilable()
      Return true if this property accessor is currently suitable for compilation.
    • getPropertyType

      Class<?> getPropertyType()
      Return the type of the accessed property - may only be known once an access has occurred.
    • generateCode

      void generateCode(String propertyName, MethodVisitor methodVisitor, CodeFlow codeFlow)
      Generate the bytecode that performs the access operation into the specified MethodVisitor using context information from the CodeFlow where necessary.
      参数:
      propertyName - the name of the property
      methodVisitor - the ASM method visitor into which code should be generated
      codeFlow - the current state of the expression compiler