Annotation Interface ELEnvironment


Declares the compilation time environment shared by the expressions of the annotated type.

The environment is the compilation time counterpart of the jakarta.el.ELContext: it provides the variable types, the imported classes and the functions that are known when the expressions are compiled.

An environment declared on a field, a method or a parameter applies to the expressions declared on that member, on top of the environment of the class. The expressions declared on a method, or on one of its parameters, additionally see the parameters of the method as variables, under their names and with their declared types, unless a variable of the same name is declared explicitly.

Since:
1.0
Author:
Denis Stepanov
  • Element Details

    • variables

      ELVariable[] variables
      Returns:
      The statically typed variables available to the expressions
      Default:
      {}
    • imports

      Class<?>[] imports
      Returns:
      The classes imported into the expression environment
      Default:
      {}
    • importPackages

      String[] importPackages
      Returns:
      The packages imported into the expression environment
      Default:
      {}
    • staticImports

      Class<?>[] staticImports
      Returns:
      The classes whose public static fields and methods are imported statically
      Default:
      {}
    • functions

      ELFunctions[] functions
      Returns:
      The function namespaces available to the expressions
      Default:
      {}