Interface CompilablePropertyAccessor

All Superinterfaces:
Opcodes, PropertyAccessor, TargetedAccessor
All Known Implementing Classes:
MapAccessor

public interface CompilablePropertyAccessor extends PropertyAccessor, Opcodes
A compilable PropertyAccessor is able to generate bytecode that represents the access operation, facilitating compilation to bytecode of expressions that use the accessor.
Since:
4.1
Author:
Andy Clement
  • Method Details

    • 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.
      Parameters:
      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