Search in sources :

Example 1 with AnnotationTypeSupport

use of com.oracle.svm.core.hub.AnnotationTypeSupport in project graal by oracle.

the class AnnotationTypeFeature method afterRegistration.

@Override
public void afterRegistration(AfterRegistrationAccess access) {
    ImageSingletons.add(AnnotationTypeSupport.class, new AnnotationTypeSupport());
    ((AfterRegistrationAccessImpl) access).getImageClassLoader().allAnnotations().stream().map(a -> a.getAnnotation(Repeatable.class)).filter(Objects::nonNull).map(Repeatable::value).forEach(repeatableAnnotationClasses::add);
}
Also used : ImageSingletons(org.graalvm.nativeimage.ImageSingletons) Feature(org.graalvm.nativeimage.Feature) AutomaticFeature(com.oracle.svm.core.annotate.AutomaticFeature) AnalysisUniverse(com.oracle.graal.pointsto.meta.AnalysisUniverse) DuringAnalysisAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringAnalysisAccessImpl) EconomicSet(org.graalvm.collections.EconomicSet) AnalysisType(com.oracle.graal.pointsto.meta.AnalysisType) AnnotationTypeSupport(com.oracle.svm.core.hub.AnnotationTypeSupport) Objects(java.util.Objects) Stream(java.util.stream.Stream) Repeatable(java.lang.annotation.Repeatable) AfterRegistrationAccessImpl(com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl) Annotation(java.lang.annotation.Annotation) AnnotatedElement(java.lang.reflect.AnnotatedElement) AfterRegistrationAccessImpl(com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl) AnnotationTypeSupport(com.oracle.svm.core.hub.AnnotationTypeSupport) Objects(java.util.Objects)

Aggregations

AnalysisType (com.oracle.graal.pointsto.meta.AnalysisType)1 AnalysisUniverse (com.oracle.graal.pointsto.meta.AnalysisUniverse)1 AutomaticFeature (com.oracle.svm.core.annotate.AutomaticFeature)1 AnnotationTypeSupport (com.oracle.svm.core.hub.AnnotationTypeSupport)1 AfterRegistrationAccessImpl (com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl)1 DuringAnalysisAccessImpl (com.oracle.svm.hosted.FeatureImpl.DuringAnalysisAccessImpl)1 Annotation (java.lang.annotation.Annotation)1 Repeatable (java.lang.annotation.Repeatable)1 AnnotatedElement (java.lang.reflect.AnnotatedElement)1 Objects (java.util.Objects)1 Stream (java.util.stream.Stream)1 EconomicSet (org.graalvm.collections.EconomicSet)1 Feature (org.graalvm.nativeimage.Feature)1 ImageSingletons (org.graalvm.nativeimage.ImageSingletons)1