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

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


        // forwards, as appropriate.
        //
        if ( methodName != null )
        {
            MethodDeclaration method = CompilerUtils.getClassMethod( jclass, methodName, EXCEPTION_HANDLER_TAG_NAME );
            AnnotationInstance exHandlerAnnotation = CompilerUtils.getAnnotation( method, EXCEPTION_HANDLER_TAG_NAME );
            GenForwardModel.addForwards( exHandlerAnnotation, forwardContainer, jclass, parentApp,
                                         " from exception-handler " + methodName )// @TODO I18N the comment
                   
            //
            // Also, if the exception-handler was marked "read-only", note this on the  tag.
View Full Code Here


    {
        if ( catches != null )
        {
            for ( Iterator ii = catches.iterator(); ii.hasNext();
            {
                AnnotationInstance i = ( AnnotationInstance ) ii.next();
                container.addException( new GenExceptionModel( strutsApp, i, jclass, forwardContainer ) );
            }
        }
    }   
View Full Code Here

        String bundlePath = CompilerUtils.getString( annotation, BUNDLE_PATH_ATTR, false );
        String bundleName = CompilerUtils.getString( annotation, BUNDLE_NAME_ATTR, false );
       
        if ( bundleName.length() == 0 )
        {
            AnnotationInstance immediateParent = parentAnnotations[parentAnnotations.length - 1];
            List peerAnnotations =
                    CompilerUtils.getAnnotationArray( immediateParent, MESSAGE_BUNDLES_ATTR, false );
           
            for ( Iterator ii = peerAnnotations.iterator(); ii.hasNext();
            {
                AnnotationInstance peerAnnotation = ( AnnotationInstance ) ii.next();
                if ( ! CompilerUtils.annotationsAreEqualannotation, peerAnnotation, false, getEnv() )
                     && CompilerUtils.getString( peerAnnotation, BUNDLE_NAME_ATTR, false ).length() == 0 )
                {
                    addError( annotation, "error.multiple-default-message-resources", BUNDLE_NAME_ATTR );
                }
View Full Code Here

    {
        if ( forwards != null )
        {
            for ( Iterator ii = forwards.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                container.addForward( new GenForwardModel( strutsApp, ann, jclass, commentSuffix ) );
            }
        }
    }
View Full Code Here

       
        if ( actionOutputs != null )
        {
            for ( Iterator ii = actionOutputs.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                addActionOutput( new GenActionOutputModel( ann, jclass ) );
            }
        }
    }
View Full Code Here

        {
            int anonCount = 0;
           
            for ( Iterator ii = conditionalFwdAnnotations.iterator(); ii.hasNext();
            {
                AnnotationInstance conditionalFwdAnnotation = ( AnnotationInstance ) ii.next();
                ForwardModel conditionalFwd = new SimpleActionForward( parentApp, conditionalFwdAnnotation, jclass );
                String expression = CompilerUtils.getString( conditionalFwdAnnotation, CONDITION_ATTR, true );
                assert expression != null;
               
                if ( conditionalFwd.getName() == null ) conditionalFwd.setName( "_anon" + ++anonCount );
View Full Code Here

        //
        String bundle = ( String ) value.getValue();

        if ( bundle != null && !bundlesSupported( parentAnnotations, classMember ) )
        {
            AnnotationInstance annotation = parentAnnotations[ parentAnnotations.length - 1 ];
            addError( value, "error.validation-bundle-support", BUNDLE_NAME_ATTR, annotation );
        }

        return null;
    }
View Full Code Here

        // @Jpf.Action or @Jpf.ValidatableProperty. If the root is
        // the Controller then just get the required attribute.
        // Otherwise, get the controller class declaration then the
        // attribute.
        //
        AnnotationInstance ann = parentAnnotations[0];
        String validatorVersion = null;

        if ( CompilerUtils.isJpfAnnotation( ann, CONTROLLER_TAG_NAME ) )
        {
            validatorVersion = CompilerUtils.getEnumFieldName( ann, VALIDATOR_VERSION_ATTR, true );
View Full Code Here

        // Check to make sure that either the parent ValidatableProperty annotation has a displayName property,
        // or this rule specifies a first argument to the default message, or this rule specifies its own message.
        // If none of these are true, output a warning.
        //
        assert parentAnnotations.length > 0;
        AnnotationInstance immediateParent = parentAnnotations[parentAnnotations.length - 1];
       
        if ( CompilerUtils.getString( immediateParent, DISPLAY_NAME_ATTR, true ) == null
             && CompilerUtils.getString( immediateParent, DISPLAY_NAME_KEY_ATTR, true ) == null
             && CompilerUtils.getString( annotation, MESSAGE_KEY_ATTR, true ) == null
             && CompilerUtils.getString( annotation, MESSAGE_ATTR, true ) == null )
        {
            boolean useDefaultDisplayName = true;
            List messageArgs =
                    CompilerUtils.getAnnotationArray( annotation, MESSAGE_ARGS_ATTR, true );

            if ( messageArgs != null )
            {
                boolean firstArg = true;

                for ( Iterator ii = messageArgs.iterator(); ii.hasNext();
                {
                    AnnotationInstance messageArg = ( AnnotationInstance ) ii.next();
                    Integer position = CompilerUtils.getInteger( messageArg, POSITION_ATTR, true );

                    if ( ( position == null && firstArg ) || ( position != null && position.intValue() == 0 ) )
                    {
                        useDefaultDisplayName = false;
View Full Code Here

                return new FacesBackingChecker( env, fbInfo, diagnostics );
            }
        }
        else
        {
            AnnotationInstance ann = CompilerUtils.getAnnotation( classDecl, CONTROLLER_TAG_NAME );
           
            if ( ann != null )
            {
                diagnostics.addError( ann, "error.annotation-invalid-base-class2",
                                      CONTROLLER_TAG_NAME, JPF_BASE_CLASS, SHARED_FLOW_BASE_CLASS );
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.