Annotation Interface OperationProxy


@Retention(SOURCE) @Target(TYPE) @Repeatable(OperationProxy.Repeat.class) public @interface OperationProxy
Defines an operation using an existing Node. The node class should be annotated OperationProxy.Proxyable in order to validate the class for use as an operation.

Operation proxies are useful for migrating AST interpreters to the Bytecode DSL. Additionally, they can be a code organization tool, separating operation classes from the bytecode root node class.

There are some extra restrictions on nodes that are used as proxies. In general, the node should be written using static specializations with at least package-private visibility. There may be additional restrictions; the Truffle annotation processor will report any problems and describe how to fix them.

Refer to the user guide for more details.

Since:
24.2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Designates a Node class as eligible for proxying.
    static @interface 
    Repeat annotation for OperationProxy.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The Node class to proxy.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether executing this operation should force the uncached interpreter (if enabled) to transition to cached.
    Optional documentation for the operation proxy.
    The name to use for the operation.
    Class<? extends Tag>[]
    The instrumentation tags that should be implicitly associated with this operation.
  • Element Details

    • value

      Class<?> value
      The Node class to proxy.
      Since:
      24.2
    • name

      String name
      The name to use for the operation. If no name is specified, the class name (without the "Node" suffix, if present) will be used.
      Since:
      24.2
      Default:
      ""
    • forceCached

      boolean forceCached
      Whether executing this operation should force the uncached interpreter (if enabled) to transition to cached.
      Since:
      24.2
      See Also:
      Default:
      false
    • javadoc

      String javadoc
      Optional documentation for the operation proxy. This documentation is included in the javadoc for the generated interpreter.
      Since:
      24.2
      Default:
      ""
    • tags

      Class<? extends Tag>[] tags
      The instrumentation tags that should be implicitly associated with this operation.
      Since:
      24.2
      See Also:
      Default:
      {}