Class Tag
java.lang.Object
com.oracle.truffle.api.instrumentation.Tag
- Direct Known Subclasses:
DebuggerTags.AlwaysHalt
,StandardTags.CallTag
,StandardTags.ExpressionTag
,StandardTags.ReadVariableTag
,StandardTags.RootBodyTag
,StandardTags.RootTag
,StandardTags.StatementTag
,StandardTags.TryBlockTag
,StandardTags.WriteVariableTag
Base class for tags used in the Truffle instrumentation framework.
- Since:
- 0.33
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Annotation applied toTag
subclasses to specify the tag identifier. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindProvidedTag
(LanguageInfo language, String tagId) Finds a provided tag by the language using itsidentifier
.static String
getIdentifier
(Class<? extends Tag> tag) Returns the alias of a particular tag ornull
if no alias was specified for this tag.
-
Constructor Details
-
Tag
protected Tag()No instances of tags allowed. Tags are marker classes.- Since:
- 0.33
-
-
Method Details
-
findProvidedTag
Finds a provided tag by the language using itsidentifier
. If the language implementation class is not yet loaded then this method will force the loading. Therefore it is not recommended to iterate over the entire list of languages and request all provided tags. It is guaranteed that there is only one provided tag class per tag identifier and language. For different languages the same tag id might refer to different tag classes.- Since:
- 0.33
-
getIdentifier
Returns the alias of a particular tag ornull
if no alias was specified for this tag.- Parameters:
tag
- the tag to return the alias for.- Returns:
- the alias string
- Since:
- 0.33
-