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

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


    private boolean checkValidationAnnotation( MethodDeclaration method, String annotationTagName,
                                               AnnotationGrammar grammar )
            throws FatalCompileTimeException
    {
        AnnotationInstance annotation = CompilerUtils.getAnnotation( method, annotationTagName );
       
        if ( annotation != null )
        {
            if ( CompilerUtils.getBeanProperty( method ) == null )
            {
View Full Code Here


    public void generate( ClassDeclaration publicClass )
        throws FatalCompileTimeException
    {
        try {
            AnnotationInstance facesBackingAnnotation = CompilerUtils.getAnnotation( publicClass, FACES_BACKING_TAG_NAME );
            assert facesBackingAnnotation != null// checker should enforce this
            AnnotationToXML atx = new AnnotationToXML( publicClass );

            // Add the class-level @Jpf.FacesBacking annotation.
            atx.include( publicClass, facesBackingAnnotation );

            // For each method, add the @Jpf.CommandHandler annotation.
            MethodDeclaration[] methods = CompilerUtils.getClassMethods( publicClass, COMMAND_HANDLER_TAG_NAME );
            for ( int i = 0; i < methods.length; i++ )
            {
                MethodDeclaration method = methods[i];
                AnnotationInstance commandHandlerAnn = CompilerUtils.getAnnotation( method, COMMAND_HANDLER_TAG_NAME );
                atx.include( method, commandHandlerAnn );
            }

            // Add @Jpf.SharedFlowField, @Jpf.PageFlowField, @Control.
            FlowControllerGenerator.includeFieldAnnotations( atx, publicClass, PAGE_FLOW_FIELD_TAG_NAME );
View Full Code Here

        //
        if ( methodName != null )
        {
            setHandlerMethod( methodName );
            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

       
        if ( annotations != null )
        {
            for ( Iterator ii = annotations.iterator(); ii.hasNext();
            {
                AnnotationInstance ann = ( AnnotationInstance ) ii.next();
                Object key = CompilerUtils.getAnnotationValue( ann, keyAttr, true );
                if ( key != null ) keyedList.put( key.toString(), ann );
            }
        }
    }
View Full Code Here

        //
        if ( jclass != null && jclass instanceof ClassDeclaration )
        {
            ClassType superClass = ( ( ClassDeclaration ) jclass ).getSuperclass();
            if ( superClass != null ) mergeControllerAnnotations( superClass.getDeclaration() );
            AnnotationInstance controllerAnnotation = CompilerUtils.getAnnotation( jclass, CONTROLLER_TAG_NAME );
            if ( controllerAnnotation != null ) mergeAnnotation( controllerAnnotation );
        }
    }
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

        MethodDeclaration[] methods = CompilerUtils.getClassMethods( flowControllerClass, null );
       
        for ( int i = 0; i < methods.length; i++ )
        {
            MethodDeclaration method = methods[i];
            AnnotationInstance ann = CompilerUtils.getAnnotation( method, ACTION_TAG_NAME );
           
            if ( ann != null )
            {
                enableNavigateTo( CompilerUtils.getAnnotation( ann, VALIDATION_ERROR_FORWARD_ATTR, true ), fcInfo );
            }
View Full Code Here

    {
        if ( childAnnotations != null )
        {
            for ( Iterator ii = childAnnotations.iterator(); ii.hasNext();
            {
                AnnotationInstance childAnnotation = ( AnnotationInstance ) ii.next();
                enableNavigateTo( childAnnotation, fcInfo );
            }
        }
    }
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.