Search in sources :

Example 1 with AnnotationProcessorImpl

use of org.glassfish.apf.impl.AnnotationProcessorImpl in project Payara by payara.

the class SJSASFactory method postConstruct.

@SuppressWarnings({ "unused", "unchecked" })
@PostConstruct
private void postConstruct() {
    if (systemProcessor != null && systemProcessorMetaDataComplete != null)
        return;
    // initialize our system annotation processor...
    systemProcessor = new AnnotationProcessorImpl();
    systemProcessorMetaDataComplete = new AnnotationProcessorImpl();
    for (ActiveDescriptor<?> i : locator.getDescriptors(BuilderHelper.createContractFilter(AnnotationHandler.class.getName()))) {
        ActiveDescriptor<AnnotationHandler> descriptor = (ActiveDescriptor<AnnotationHandler>) i;
        String annotationTypeName = getAnnotationHandlerForStringValue(descriptor);
        if (annotationTypeName == null)
            continue;
        systemProcessor.pushAnnotationHandler(annotationTypeName, new LazyAnnotationHandler(descriptor));
        annotationClassNames.add("L" + annotationTypeName.replace('.', '/') + ";");
        // falling in this category in the future, add them to this list
        if (annotationTypeName.equals("javax.annotation.ManagedBean")) {
            systemProcessorMetaDataComplete.pushAnnotationHandler(annotationTypeName, new LazyAnnotationHandler(descriptor));
            annotationClassNamesMetaDataComplete.add("L" + annotationTypeName.replace('.', '/') + ";");
        }
    }
}
Also used : ActiveDescriptor(org.glassfish.hk2.api.ActiveDescriptor) AnnotationHandler(org.glassfish.apf.AnnotationHandler) AnnotationProcessorImpl(org.glassfish.apf.impl.AnnotationProcessorImpl) PostConstruct(javax.annotation.PostConstruct)

Aggregations

PostConstruct (javax.annotation.PostConstruct)1 AnnotationHandler (org.glassfish.apf.AnnotationHandler)1 AnnotationProcessorImpl (org.glassfish.apf.impl.AnnotationProcessorImpl)1 ActiveDescriptor (org.glassfish.hk2.api.ActiveDescriptor)1