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 ClassesModifier and TypeClassDescriptionstatic @interface
Designates aNode
class as eligible for proxying.static @interface
Repeat annotation forOperationProxy
. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
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.The instrumentation tags that should be implicitly associated with this operation.
-
Element Details
-
value
-
name
String nameThe 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 forceCachedWhether executing this operation should force the uncached interpreter (if enabled) to transition to cached.- Since:
- 24.2
- See Also:
- Default:
false
-
javadoc
String javadocOptional documentation for the operation proxy. This documentation is included in the javadoc for the generated interpreter.- Since:
- 24.2
- Default:
""
-
tags
-