Package com.oracle.truffle.api.library
Annotation Interface ExportMessage
@Retention(RUNTIME)
@Target({METHOD,TYPE})
@Repeatable(Repeat.class)
public @interface ExportMessage
Exports the annotated method or class as library message. The annotation can only be applied to
method or classes with an enclosing class annotated by
ExportLibrary
. Exported messages
are inherited to subclasses of the enclosing class. If they are redeclared in the sub-class then
the semantics of the overridden message is replaced by the semantics of the sub-class. A class
and a method cannot be exported at the same time for a single message and enclosing class.- Since:
- 19.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Explicitly ignores warning messages originating from theExportLibrary
annotation.static @interface
-
Optional Element Summary
-
Element Details
-
name
String nameReturns the message simple name to export. If not specified, the exported message name is inherited from the enclosing method name or class. In case of an exported class the first letter is automatically translated to lower-case. The name attribute should be specified if the exported message does not match the exported method or class name or if multiple messages need to be exported for a method or class.- Since:
- 19.0
- Default:
""
-
library
Returns the library to export by this method or class. Automatically selected if the name of the message is unique. Needs to be specified if the name is not unique when implementing multiple libraries.- Since:
- 19.0
- Default:
com.oracle.truffle.api.library.Library.class
-
limit
String limitSpecifies the limit of an exported message. The limit specifies the number of specialized instances ofcached library
should be used until the library rewrites itself to an uncached case.- Since:
- 19.0
- See Also:
- Default:
""
-