Interface CompilablePropertyAccessor

All Superinterfaces:
Opcodes, PropertyAccessor
All Known Implementing Classes:
MapAccessor, 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.
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 mv, CodeFlow cf)
      Generate the bytecode the performs the access operation into the specified MethodVisitor using context information from the codeflow where necessary.
      Parameters:
      propertyName - the name of the property
      mv - the Asm method visitor into which code should be generated
      cf - the current state of the expression compiler