Examples of annotations()


Examples of org.jboss.jandex.ClassInfo.annotations()

        Set<String> localInterfaces = new HashSet<String>();
        for(DotName iface : interfaces) {
            final ClassInfo ifaceClass = compositeIndex.getClassByName(iface);

            if(ifaceClass != null) {
                final List<AnnotationInstance> annotations = ifaceClass.annotations().get(annotationType);
                if(annotations != null) {
                    for(AnnotationInstance annotation : annotations) {
                        if(annotation.target() instanceof ClassInfo) {
                            localInterfaces.add(iface.toString());
                            break;
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

        final ClassInfo classInfo = index.getClassByName(iface);
        if(classInfo == null) {
            logger.warnf("Could not read annotations in interface %s when determining local interfaces for %s",iface, sessionBeanClass.name());
            return null;
        }
        List<AnnotationInstance> annotations = classInfo.annotations().get(REMOTE);
        if(annotations == null || annotations.isEmpty()) {
            return iface.toString();
        }
        for(AnnotationInstance annotation : annotations) {
            if(annotation.target() instanceof ClassInfo) {
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

    private SessionType determineSessionType(final String ejbClass, final CompositeIndex compositeIndex) {
        if(ejbClass == null) {
            return null;
        }
        final ClassInfo info = compositeIndex.getClassByName(DotName.createSimple(ejbClass));
        if(info.annotations().get(STATEFUL_ANNOTATION) != null) {
            return SessionType.Stateful;
        } else if(info.annotations().get(STATELESS_ANNOTATION) != null) {
            return SessionType.Stateless;
        } else if(info.annotations().get(SINGLETON_ANNOTATION) != null) {
            return SessionType.Singleton;
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

            return null;
        }
        final ClassInfo info = compositeIndex.getClassByName(DotName.createSimple(ejbClass));
        if(info.annotations().get(STATEFUL_ANNOTATION) != null) {
            return SessionType.Stateful;
        } else if(info.annotations().get(STATELESS_ANNOTATION) != null) {
            return SessionType.Stateless;
        } else if(info.annotations().get(SINGLETON_ANNOTATION) != null) {
            return SessionType.Singleton;
        }
        return null;
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

        final ClassInfo info = compositeIndex.getClassByName(DotName.createSimple(ejbClass));
        if(info.annotations().get(STATEFUL_ANNOTATION) != null) {
            return SessionType.Stateful;
        } else if(info.annotations().get(STATELESS_ANNOTATION) != null) {
            return SessionType.Stateless;
        } else if(info.annotations().get(SINGLETON_ANNOTATION) != null) {
            return SessionType.Singleton;
        }
        return null;
    }
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

        final ClassInfo endpointClassInfo = index.getClassByName(endpointDotName);

        if (endpointClassInfo != null) {
            if (jaxws) {
                //directly check annotations when looking for jaxws endpoints
                if (endpointClassInfo.annotations().containsKey(WEB_SERVICE_ANNOTATION))
                    return true;
                if (endpointClassInfo.annotations().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION))
                    return true;
            } else {
                //just verify the class is not a servlet for jaxrpc endpoints
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

        if (endpointClassInfo != null) {
            if (jaxws) {
                //directly check annotations when looking for jaxws endpoints
                if (endpointClassInfo.annotations().containsKey(WEB_SERVICE_ANNOTATION))
                    return true;
                if (endpointClassInfo.annotations().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION))
                    return true;
            } else {
                //just verify the class is not a servlet for jaxrpc endpoints
                if (!isServlet(endpointClassInfo, index))
                    return true;
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

                    // check webservice annotations
                    Map<DotName, List<AnnotationInstance>> map = null;
                    if (annotationIndex != null) {
                        ClassInfo ci = annotationIndex.getClassByName(DotName.createSimple(endpointClassName));
                        if (ci != null) {
                            map = ci.annotations();
                        }
                    }
                    if (map == null) {
                        map = new HashMap<DotName, List<AnnotationInstance>>();
                    }
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

        Class<SingletonComponentDescription> componentDescriptionType = SingletonComponentDescription.class;
        // Only process EJB deployments and components that are applicable
        if (!EjbDeploymentMarker.isEjbDeployment(deploymentUnit) || !(componentDescriptionType.isAssignableFrom(componentDescription.getClass()))) {
            return;
        }
        final Map<DotName, List<AnnotationInstance>> annotationsOnBean = beanClass.annotations();
        if (annotationsOnBean == null || annotationsOnBean.isEmpty()) {
            return;
        }

        final SingletonComponentDescription singletonComponentDescription = componentDescriptionType.cast(componentDescription);
View Full Code Here

Examples of org.jboss.jandex.ClassInfo.annotations()

    protected WeldBeanDeploymentArchive processAnnotatedDiscovery(BeanArchiveBuilder builder) {
        Iterator<String> classIterator = builder.getClassIterator();
        while (classIterator.hasNext()) {
            String className = classIterator.next();
            ClassInfo cinfo = cindex.getClassByName(DotName.createSimple(className));
            if (!containsBeanDefiningAnnotation(cinfo.annotations().keySet())) {
                classIterator.remove();
            }
        }
        return builder.build();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.