Package org.jboss.jandex

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


        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

        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

        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

                    // 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

        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

    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

        @Override
        public Set<String> apply(DotName name) {
            ClassInfo annotationClassInfo = index.getClassByName(name);
            ImmutableSet.Builder<String> builder = ImmutableSet.builder();
            if (annotationClassInfo != null) {
                for (DotName annotationName : annotationClassInfo.annotations().keySet()) {
                    builder.add(annotationName.toString());
                }
            } else {
                try {
                    Class<?> annotationClass = classLoader.loadClass(name.toString());
View Full Code Here

        }
        final ClassInfo info = compositeIndex.getClassByName(DotName.createSimple(ejbClass));
        if (info == null) {
            return null;
        }
        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

        if (info == null) {
            return null;
        }
        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

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.