Package org.jboss.jandex

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


    @Override
    protected void processAnnotations(final ClassInfo beanClass, final CompositeIndex index, final EJBComponentDescription componentDescription) throws DeploymentUnitProcessingException {
        ClassInfo klass = beanClass;
        while (klass != null) {
            Map<DotName, List<AnnotationInstance>> annotationsOnBean = klass.annotations();
            if (annotationsOnBean == null || annotationsOnBean.isEmpty()) {
                // move to the super class
                klass = getSuperClass(klass, index);
                continue;
            }
View Full Code Here


            final String beanName = managedBeanAnnotation.value().isEmpty() ? beanClassName : managedBeanAnnotation.value();
            final ManagedBeanConfiguration managedBeanConfiguration = new ManagedBeanConfiguration(beanName, beanClass);

            processLifecycleMethods(managedBeanConfiguration, beanClass, index);

            final Map<DotName, List<AnnotationTarget>> classAnnotations = classInfo.annotations();
            managedBeanConfiguration.setResourceConfigurations(processResources(classAnnotations, beanClass));

            managedBeanConfiguration.setInterceptorConfigurations(processInterceptors(index, classAnnotations, beanClass));

            managedBeanConfigurations.add(managedBeanConfiguration);
View Full Code Here

        final Class<?>[] interceptorTypes = interceptorsAnnotation.value();
        for(Class<?> interceptorType : interceptorTypes) {
            final ClassInfo classInfo = index.getClassByName(DotName.createSimple(interceptorType.getName()));
            if(classInfo == null)
                continue; // TODO: Process without index info
            final Map<DotName, List<AnnotationTarget>> interceptorClassAnnotations = classInfo.annotations();

            final Method aroundInvokeMethod = getSingleAnnotatedMethod(interceptorType, classInfo, AroundInvoke.class, true);
            final List<ResourceConfiguration> resourceConfigurations = processResources(interceptorClassAnnotations, interceptorType);
            interceptorConfigurations.add(new InterceptorConfiguration(interceptorType, aroundInvokeMethod, resourceConfigurations));
        }
View Full Code Here

                Indexer indexer = new Indexer();
                ClassInfo classInfo = indexer.index(inputStream);
                if(classInfo == null)
                    throw new IOException("Failed to read class info");
               
                Map<DotName, List<AnnotationInstance>> annotations = classInfo.annotations();
                DotName moduleAnnotationName = DotName.createSimple(com.redhat.ceylon.compiler.java.metadata.Module.class.getName());
                List<AnnotationInstance> moduleAnnotations = annotations.get(moduleAnnotationName);
                if(moduleAnnotations == null || moduleAnnotations.size() != 1)
                    throw new IOException("Missing module annotation: "+annotations);
                AnnotationInstance moduleAnnotation = moduleAnnotations.get(0);
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.