Package org.jboss.as.deployment.managedbean.config

Examples of org.jboss.as.deployment.managedbean.config.ResourceConfiguration


        if (resourceTargets == null) {
            return Collections.emptyList();
        }
        final List<ResourceConfiguration> resourceConfigurations = new ArrayList<ResourceConfiguration>(resourceTargets.size());
        for (AnnotationTarget annotationTarget : resourceTargets) {
            final ResourceConfiguration resourceConfiguration;
            if (annotationTarget instanceof FieldInfo) {
                resourceConfiguration = processFieldResource(FieldInfo.class.cast(annotationTarget), owningClass);
            } else if(annotationTarget instanceof MethodInfo) {
                resourceConfiguration = processMethodResource(MethodInfo.class.cast(annotationTarget), owningClass);
            } else if(annotationTarget instanceof ClassInfo) {
View Full Code Here


        }
        final Resource resource = field.getAnnotation(Resource.class);
        if (resource != null) {
            final String localContextName = resource.name().isEmpty() ? fieldName : resource.name();
            final Class<?> injectionType = resource.type().equals(Object.class) ? field.getType() : resource.type();
            return new ResourceConfiguration(fieldName, field, ResourceConfiguration.TargetType.FIELD, injectionType, localContextName, getTargetContextName(resource, fieldName, injectionType));
        }
        return null;
    }
View Full Code Here

        final Resource resource = method.getAnnotation(Resource.class);
        if (resource != null) {
            final String contextNameSuffix = methodName.substring(3, 4).toLowerCase() + methodName.substring(4);
            final Class<?> injectionType = resource.type().equals(Object.class) ? method.getReturnType() : resource.type();
            final String localContextName = resource.name().isEmpty() ? contextNameSuffix : resource.name();
            return new ResourceConfiguration(methodName, method, ResourceConfiguration.TargetType.METHOD, injectionType, localContextName, getTargetContextName(resource, contextNameSuffix, injectionType));
        }
        return null;
    }
View Full Code Here

            throw new DeploymentUnitProcessingException("Class level @Resource annotations must provide a mapped name.");
        }
        if(Object.class.equals(resource.type())) {
            throw new DeploymentUnitProcessingException("Class level @Resource annotations must provide a type.");
        }
        return new ResourceConfiguration(owningClass.getName(), null, ResourceConfiguration.TargetType.CLASS, resource.type(), resource.name(), resource.mappedName());
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.deployment.managedbean.config.ResourceConfiguration

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.