Package org.apache.webbeans.deployment.stereotype

Examples of org.apache.webbeans.deployment.stereotype.IStereoTypeModel


    {
        Set<Class<? extends Annotation>> allSupportedScopes = new HashSet<Class<? extends Annotation>>();
        Annotation[] stereoTypes = getComponentStereoTypes(component);       
        for (Annotation stereoType : stereoTypes)
        {
            IStereoTypeModel model = StereoTypeManager.getInstance().getStereoTypeModel(stereoType.annotationType().getName());
            Set<Class<?>> rtypes = model.getRestrictedTypes();

            if (rtypes != null)
            {
                Iterator<Class<?>> itTypes = rtypes.iterator();
                while (itTypes.hasNext())
                {
                    if (!component.getTypes().contains(itTypes.next()))
                    {
                        throw new WebBeansConfigurationException(errorMessage + " must contains all supported api types in the @Stereotype annotation " + model.getName());

                    }
                }
            }

            Set<Class<? extends Annotation>> suppScopes = model.getSupportedScopes();
            if (suppScopes != null)
            {
                if (!suppScopes.isEmpty())
                {
                    allSupportedScopes.addAll(suppScopes);
View Full Code Here


    public static void checkSteroTypeRequirements(Component<?> component, Annotation[] anns, String errorMessage)
    {
        Annotation[] stereoTypes = getComponentStereoTypes(component);
        for (Annotation stereoType : stereoTypes)
        {
            IStereoTypeModel model = StereoTypeManager.getInstance().getStereoTypeModel(stereoType.annotationType().getName());
            Set<Class<?>> rtypes = model.getRestrictedTypes();

            if (rtypes != null)
            {
                Iterator<Class<?>> itTypes = rtypes.iterator();
                while (itTypes.hasNext())
                {
                    if (!component.getTypes().contains(itTypes.next()))
                    {
                        throw new WebBeansConfigurationException(errorMessage + " must contains all supported api types in the @Stereotype annotation " + model.getName());

                    }
                }
            }

            Set<Class<? extends Annotation>> suppScopes = model.getSupportedScopes();
            if (suppScopes != null)
            {
                if (!suppScopes.isEmpty())
                {
                    if (!suppScopes.contains(component.getScopeType()))
                    {
                        throw new WebBeansConfigurationException(errorMessage + " must contains all required scope types in the @Stereotype annotation " + model.getName());
                    }
                }
            }
        }
    }
View Full Code Here

        {
            if (AnnotationUtil.hasClassAnnotation(ann, Named.class))
            {
                return true;
            }
            final IStereoTypeModel model = webBeansContext.getStereoTypeManager().getStereoTypeModel(ann.getName());
            if (model != null && model.isNamed())
            {
                return true;
            }
        }
View Full Code Here

        {
            if (AnnotationUtil.hasClassAnnotation(ann, Named.class))
            {
                return true;
            }
            final IStereoTypeModel model = webBeansContext.getStereoTypeManager().getStereoTypeModel(ann.getName());
            if (model != null && model.isNamed())
            {
                return true;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.deployment.stereotype.IStereoTypeModel

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.