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

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


    {
        if ( messageResources != null )
        {
            for ( Iterator ii = messageResources.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                addMessageResources( new GenMessageBundleModel( this, ann ) );
            }
        }
    }
View Full Code Here


    {
        if ( messageBundles != null )
        {
            for ( Iterator ii = messageBundles.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                addMessageResources( new GenMessageBundleModel( this, ann ) );
            }
        }
    }
View Full Code Here

    {
        if ( simpleActionAnnotations != null )
        {
            for ( Iterator ii = simpleActionAnnotations.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                TypeDeclaration containingType = ann.getContainingType();
               
                // If this is an inherited method, add a delegating action mapping.
                if (CompilerUtils.typesAreEqual(_jclass, containingType)) {
                    addActionMapping( new GenSimpleActionModel(ann, this, _jclass));
                } else {
View Full Code Here

    {
        if ( ! ( formTypeDecl instanceof ClassDeclaration ) ) return null;
       
        ClassDeclaration formClassDecl = ( ClassDeclaration ) formTypeDecl;
       
        AnnotationInstance ann = CompilerUtils.getAnnotation( formClassDecl, FORM_BEAN_TAG_NAME, true );
       
        if ( ann != null )
        {
            String defaultMessageResources = CompilerUtils.getString( ann, MESSAGE_BUNDLE_ATTR, true );
           
View Full Code Here

           
            if ( simpleActionAnnotations != null )
            {
                for ( Iterator i = simpleActionAnnotations.iterator(); i.hasNext();
                {
                    AnnotationInstance ann = ( AnnotationInstance ) i.next();
                    String name = CompilerUtils.getString( ann, NAME_ATTR, false );
               
                    if ( actionName.equals( name )
                            && ! CompilerUtils.annotationsAreEqual( ann, annotationToIgnore, false, env ) )
                    {
View Full Code Here

            //
            if ( catches != null )
            {
                for ( Iterator ii = catches.iterator(); ii.hasNext();
                {
                    AnnotationInstance catchAnnotation = ( AnnotationInstance ) ii.next();
                    String methodName = CompilerUtils.getString( catchAnnotation, METHOD_ATTR, false );
                   
                    if ( methodName.length() > 0 )
                    {
                        MethodDeclaration[] allMethods = CompilerUtils.getClassMethods( outerType, null );
                       
                        for ( int i = 0; i < allMethods.length; i++ )
                        {
                            MethodDeclaration method = allMethods[i];
                            AnnotationInstance exHandlerAnnotation =
                                CompilerUtils.getAnnotation( method, EXCEPTION_HANDLER_TAG_NAME );
                           
                            if ( exHandlerAnnotation != null && method.getSimpleName().equals( methodName ) )
                            {
                                Collection forwardAnnotations =
                                        CompilerUtils.getAnnotationArray( exHandlerAnnotation, FORWARDS_ATTR, false );
                               
                                for ( Iterator i3 = forwardAnnotations.iterator(); i3.hasNext();
                                {
                                    AnnotationInstance forwardAnnotation = ( AnnotationInstance ) i3.next();
                                    additionalEntities.add( forwardAnnotation );
                                }
                            }
                        }
                    }
View Full Code Here

        setClassName(ACTION_MAPPING_CLASSNAME);
        setParameter(parent.getFlowControllerClass().getQualifiedName());

        // loginRequired - Set this to override the delegating action property
        // only if loginRequired is set on the Controller annotation.
        AnnotationInstance controllerAnnotation = CompilerUtils.getAnnotation(jclass, CONTROLLER_TAG_NAME);
        Boolean loginRequired = CompilerUtils.getBoolean(controllerAnnotation, LOGIN_REQUIRED_ATTR, true);
        if (loginRequired != null) {
            setLoginRequired(loginRequired);
        }
View Full Code Here

        setClassName(DelegatingActionModel.ACTION_MAPPING_CLASSNAME);
        setParameter(parent.getFlowControllerClass().getQualifiedName());

        // loginRequired - Set this to override the delegating action property
        // only if loginRequired is set on the Controller annotation.
        AnnotationInstance controllerAnnotation = CompilerUtils.getAnnotation( jclass, CONTROLLER_TAG_NAME );
        Boolean loginRequired = CompilerUtils.getBoolean( controllerAnnotation, LOGIN_REQUIRED_ATTR, true );
        if (loginRequired != null) {
            setLoginRequired(loginRequired);
        }
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

        // 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

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.