Package org.jboss.jandex

Examples of org.jboss.jandex.DotName


                } catch (ClassNotFoundException ignored) {
                }
            }
        }
        // superclass
        final DotName superName = clazz.superName();
        if (superName != null && !OBJECT_NAME.equals(superName) && containsAnnotation(superName, requiredAnnotationName, originalClass, requiredAnnotation)) {
            return true;
        }
        return false;
    }
View Full Code Here


        } else {
            localContextName = declaredName;
        }

        //final AnnotationValue declaredTypeValue = annotation.value("type");
        final DotName declaredTypeDotName = fieldInfo.type().name();
        final DotName injectionTypeDotName = declaredTypeDotName == null || declaredTypeDotName.toString().equals(Object.class.getName()) ? fieldInfo.type().name() : declaredTypeDotName;

        final String injectionType = injectionTypeDotName.toString();
        final InjectionSource bindingSource = this.getBindingSource(deploymentUnit, annotation, injectionType, eeModuleClassDescription);
        if (bindingSource != null) {
            final BindingConfiguration bindingConfiguration = new BindingConfiguration(localContextName, bindingSource);
            eeModuleClassDescription.getBindingConfigurations().add(bindingConfiguration);
View Full Code Here

        if (isAnnotationDeclared(classInfo, DOT_NAME_VETOED)) {
            return true;
        }

        final DotName packageInfoName = DotName.createComponentized(getPackageName(classInfo.name()), PACKAGE_INFO_NAME);
        ClassInfo packageInfo = index.getClassByName(packageInfoName);

        if (packageInfo != null && isAnnotationDeclared(packageInfo, DOT_NAME_VETOED)) {
            return true;
        }
View Full Code Here

            // We reached a class that is not in the index. Let's use reflection.
            final Class<?> clazz = loadClass(name.toString());
            return to.isAssignableFrom(clazz);
        }

        DotName superName = fromClassInfo.superName();

        if (superName != null && isAssignableTo(superName, to)) {
            return true;
        }
View Full Code Here

            } catch (ExecutionException e) {
                throw new RuntimeException(e);
            }
        }
        // Superclass
        final DotName superName = classInfo.superName();

        if (superName != null && !OBJECT_NAME.equals(superName)) {
            final ClassInfo superClassInfo = index.getClassByName(superName);
            if (superClassInfo == null) {
                // we are accessing a class that is outside of the jandex index
                // fallback to using reflection
                return Reflections.containsAnnotation(loadClass(superName.toString()), requiredAnnotation);
            }
            if (containsAnnotation(superClassInfo, requiredAnnotationName, requiredAnnotation)) {
                return true;
            }
        }
View Full Code Here

            throw UndertowLogger.ROOT_LOGGER.unableToResolveAnnotationIndex(deploymentUnit);
        }

        // Find classes which extend, implement, or are annotated by HandlesTypes
        for (Class<?> type : typesArray) {
            DotName className = DotName.createSimple(type.getName());
            Set<ClassInfo> classInfos = processHandlesType(className, type, index);
            Set<Class<?>> classes = loadClassInfoSet(classInfos, classLoader);
            Set<ServletContainerInitializer> sciSet = typesMap.get(type);
            for (ServletContainerInitializer sci : sciSet) {
                handlesTypes.get(sci).addAll(classes);
View Full Code Here

        final CompositeIndex index = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.COMPOSITE_ANNOTATION_INDEX);
        if (index == null) {
            return;
        }
        final PropertyReplacer propertyReplacer = EJBAnnotationPropertyReplacement.propertyReplacer(deploymentUnit);
        final DotName annotationName = getAnnotationDotName();
        for (AnnotationInstance annotationInstance : index.getAnnotations(annotationName)) {
            final List<BindingConfiguration> bindingConfigurations = getAnnotatedClassBindingConfigurations(moduleDescription, annotationInstance);
            final ResourceDefinitionInjectionSource injectionSource = processAnnotation(annotationInstance, propertyReplacer);
            bindingConfigurations.add(new BindingConfiguration(injectionSource.getJndiName(),injectionSource));
        }
        final DotName collectionAnnotationName = getAnnotationCollectionDotName();
        if (collectionAnnotationName != null) {
            for (AnnotationInstance annotationInstance : index.getAnnotations(collectionAnnotationName)) {
                final AnnotationInstance[] nestedAnnotationInstances = annotationInstance.value().asNestedArray();
                if (nestedAnnotationInstances != null && nestedAnnotationInstances.length > 0) {
                    final List<BindingConfiguration> bindingConfigurations = getAnnotatedClassBindingConfigurations(moduleDescription, annotationInstance);
View Full Code Here

        final AnnotationValue declaredWsdlLocation = annotationInstance.value("wsdlLocation");
        String wsdlLocationValue = declaredWsdlLocation == null ? "" : declaredWsdlLocation.asString();
        if (wsdlLocationValue.length() > 0)
            ref.setWsdlFile(wsdlLocationValue);
        final AnnotationValue declaredTypeValue = annotationInstance.value("type");
        DotName declaredType = declaredTypeValue != null ? declaredTypeValue.asClass().name() : null;
        if (declaredType != null && declaredType.toString() != Object.class.getName()) {
            ref.setServiceRefType(declaredType.toString());
        } else
            ref.setServiceRefType(getType(annotationTarget));

        final AnnotationValue declaredValue = annotationInstance.value("value");
        DotName value = declaredValue != null ? declaredValue.asClass().name() : null;
        if (declaredValue != null && !declaredValue.toString().equals(Service.class.getName())) {
            ref.setServiceInterface(value.toString());
        }
        else {
            ClassInfo targetClass = getTypeInfo(annotationTarget);
            // FIXME
            if (targetClass != null/* && isAssignableFrom(targetClass, DotName.createSimple(Service.class.getName()))*/) {
View Full Code Here

        if (value != null)
            return value.asClass().name().toString();
        final ClassInfo beanClass = (ClassInfo) messageBeanAnnotation.target();
        final Set<DotName> interfaces = new HashSet<DotName>(getPotentialViewInterfaces(beanClass));
        // check super class(es) of the bean
        DotName superClassDotName = beanClass.superName();
        while (interfaces.isEmpty() && superClassDotName != null && !superClassDotName.toString().equals(Object.class.getName())) {
            final ClassInfo superClass = compositeIndex.getClassByName(superClassDotName);
            if (superClass == null) {
                break;
            }
            interfaces.addAll(getPotentialViewInterfaces(superClass));
View Full Code Here

            final Set<Class<?>> discoveredClasses = new HashSet<Class<?>>();
            instances.put(annotation.annotationClass, discoveredClasses);
            for (AnnotationInstance annotationInstance : annotationInstances) {
                final AnnotationTarget target = annotationInstance.target();
                if (target instanceof ClassInfo) {
                    final DotName className = ClassInfo.class.cast(target).name();
                    final Class<?> annotatedClass;
                    try {
                        annotatedClass = classLoader.loadClass(className.toString());
                    } catch (ClassNotFoundException e) {
                        throw new DeploymentUnitProcessingException(MESSAGES.classLoadingFailed(className));
                    }
                    discoveredClasses.add(annotatedClass);
                } else {
View Full Code Here

TOP

Related Classes of org.jboss.jandex.DotName

Copyright © 2018 www.massapicom. 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.