use of com.oracle.truffle.api.instrumentation.ProvidedTags in project graal by oracle.
the class LanguageCache method getProvidedTags.
@SuppressWarnings("unchecked")
Set<? extends Class<? extends Tag>> getProvidedTags() {
Set<Class<? extends Tag>> res = providedTags;
if (res == null) {
ProvidedTags tags = provider.getClass().getAnnotation(ProvidedTags.class);
if (tags == null) {
res = Collections.emptySet();
} else {
res = new HashSet<>();
Collections.addAll(res, (Class<? extends Tag>[]) tags.value());
res = Collections.unmodifiableSet(res);
}
providedTags = res;
}
return res;
}
Aggregations