Package org.apache.beehive.netui.compiler.typesystem.declaration

Examples of org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance


        if ( fields.size() > 0 )
        {
            for ( Iterator i = fields.iterator(); i.hasNext(); )
            {
                FieldDeclaration field = ( FieldDeclaration ) i.next();
                AnnotationInstance fieldAnnotation =
                        CompilerUtils.getAnnotation( field, JpfLanguageConstants.SHARED_FLOW_FIELD_TAG_NAME );
               
                if ( fieldAnnotation == null )
                {
                    fieldAnnotation = CompilerUtils.getAnnotationFullyQualified( field, CONTROL_ANNOTATION );
View Full Code Here


    {
        //
        // Check to make sure that if this is a Shared Flow field, its type matches up with the type declared
        // for the shared flow of that name.
        //
        AnnotationInstance sfFieldAnn = CompilerUtils.getAnnotation( field, SHARED_FLOW_FIELD_TAG_NAME );
       
        if ( sfFieldAnn != null )
        {
            String sharedFlowName = CompilerUtils.getString( sfFieldAnn, NAME_ATTR, true );
            assert sharedFlowName != null;
           
            Collection sharedFlowRefs =
                    getFCSourceFileInfo().getMergedControllerAnnotation().getSharedFlowRefs();
           
            boolean foundOne = false;
           
            if ( sharedFlowRefs != null )
            {
                for ( Iterator ii = sharedFlowRefs.iterator(); ii.hasNext();
                {
                    AnnotationInstance sharedFlowRef = ( AnnotationInstance ) ii.next();
                    if ( sharedFlowName.equals( CompilerUtils.getString( sharedFlowRef, NAME_ATTR, true ) ) )
                    {
                        foundOne = true;
                       
                        TypeInstance sfType = CompilerUtils.getTypeInstance( sharedFlowRef, TYPE_ATTR, true );
View Full Code Here

    private void addReturnActions( Collection forwardAnnotations, FlowControllerInfo fcInfo,
                                   TypeDeclaration outerType, String childArrayAttr )
    {
        for ( Iterator ii = forwardAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance ann = ( AnnotationInstance ) ii.next();
            String returnAction = CompilerUtils.getString( ann, RETURN_ACTION_ATTR, true );
            if ( returnAction != null ) fcInfo.addReturnAction( returnAction, ann, outerType );
           
            if ( childArrayAttr != null )
            {
View Full Code Here

                    {
                        String formName = ( String ) j.next();
                       
                        for ( int i = 0; i < annotations.length; i++ )
                        {
                            AnnotationInstance ann = annotations[i];
                           
                            if ( CompilerUtils.isJpfAnnotation( ann, VALIDATABLE_PROPERTY_TAG_NAME ) )
                            {
                                //
                                // Add field rules from the Jpf.ValidationLocaleRules annotation.
View Full Code Here

        RuleInfo ruleInfo = new RuleInfo( entityName, propertyName, displayName, displayNameKey );
               
       
        for ( Iterator ii = localeRulesAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance ann = ( AnnotationInstance ) ii.next();
            addFieldRules( ann, ruleInfo, false );
        }
       
        addFieldRules( validationFieldAnn, ruleInfo, true );
    }
View Full Code Here

        MethodDeclaration[] methods = CompilerUtils.getClassMethods( jclass, ACTION_TAG_NAME );
       
        for ( int i = 0; i < methods.length; i++ )
        {
            MethodDeclaration method = methods[i];
            AnnotationInstance actionAnnotation = CompilerUtils.getAnnotation( method, ACTION_TAG_NAME );
            assert actionAnnotation != null;
            addRulesFromActionAnnotation( actionAnnotation, method.getSimpleName() );
           
            ParameterDeclaration[] parameters = method.getParameters();
            if ( parameters.length > 0 )
            {
                TypeInstance type = parameters[0].getType();
               
                if ( type instanceof ClassType )
                {
                    ClassDeclaration classDecl = ( ( ClassType ) type ).getClassTypeDeclaration();
                    if ( classDecl.getDeclaringType() == null ) addRulesFromBeanClass( classDecl );
                }
            }
        }
       
       
        Collection simpleActions = mca.getSimpleActions();
       
        if ( simpleActions != null )
        {
            for ( Iterator ii = simpleActions.iterator(); ii.hasNext();
            {
                AnnotationInstance simpleAction = ( AnnotationInstance ) ii.next();
                String actionName = CompilerUtils.getString( simpleAction, NAME_ATTR, true );
                assert actionName != null//checker should enforce this.
                addRulesFromActionAnnotation( simpleAction, actionName );
            }
        }
View Full Code Here

        Collection validatablePropertyAnnotations =
                CompilerUtils.getAnnotationArray( actionAnnotation, VALIDATABLE_PROPERTIES_ATTR, false );
       
        for ( Iterator ii = validatablePropertyAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance validationFieldAnnotation = ( AnnotationInstance ) ii.next();
            String propertyName = CompilerUtils.getString( validationFieldAnnotation, PROPERTY_NAME_ATTR, true );
            assert propertyName != null;            // TODO: checker must enforce this
            assert ! propertyName.equals( "" );     // TODO: checker must enforce this
           
            //
View Full Code Here

    {
        Collection validationBeanAnnotations = mca.getValidatableBeans();
       
        for ( Iterator ii = validationBeanAnnotations.iterator(); ii.hasNext();
        {
            AnnotationInstance validationBeanAnnotation = ( AnnotationInstance ) ii.next();
            DeclaredType beanType = CompilerUtils.getDeclaredType( validationBeanAnnotation, TYPE_ATTR, true );
            assert beanType != null;    // checker should enforce this
           
            Collection validationFieldAnnotations =
                    CompilerUtils.getAnnotationArray( validationBeanAnnotation, VALIDATABLE_PROPERTIES_ATTR, false );
           
            for ( Iterator i2 = validationFieldAnnotations.iterator(); i2.hasNext();
            {
                AnnotationInstance validationFieldAnnotation = ( AnnotationInstance ) i2.next();
                String propName = CompilerUtils.getString( validationFieldAnnotation, PROPERTY_NAME_ATTR, true );
                assert propName != null;            // checker should enforce this
                assert ! propName.equals( "" );     // TODO: get checker to enforce this
               
                //
View Full Code Here

            {
                List annotations = CompilerUtils.getAnnotationArray( value );
               
                for ( Iterator i3 = annotations.iterator(); i3.hasNext();
                {
                    AnnotationInstance i = ( AnnotationInstance ) i3.next();
                    addFieldRuleFromAnnotation( ruleInfo, i, locale, applyToAllLocales );
                }
            }
        }
       
View Full Code Here

        if ( messageArgs != null )
        {
            int inferredPosition = 0;
            for ( Iterator ii = messageArgs.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                String arg = CompilerUtils.getString( ann, ARG_ATTR, true );
                String bundle = CompilerUtils.getString( ann, BUNDLE_NAME_ATTR, true );
                Integer position = CompilerUtils.getInteger( ann, POSITION_ATTR, true );

                if ( position == null )
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance

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.