Search in sources :

Example 1 with ProvidedTags

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;
}
Also used : ProvidedTags(com.oracle.truffle.api.instrumentation.ProvidedTags) Tag(com.oracle.truffle.api.instrumentation.Tag)

Aggregations

ProvidedTags (com.oracle.truffle.api.instrumentation.ProvidedTags)1 Tag (com.oracle.truffle.api.instrumentation.Tag)1