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

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


        Collection properties = CompilerUtils.getBeanProperties( beanClass, true );
       
        for ( Iterator ii = properties.iterator(); ii.hasNext();
        {
            CompilerUtils.BeanPropertyDeclaration property = ( CompilerUtils.BeanPropertyDeclaration ) ii.next();
            MethodDeclaration getter = property.getGetter();
            String propertyName = property.getPropertyName();
           
            if ( getter != null )
            {
                //
                // Parse validation annotations on each getter.
                //
                AnnotationInstance[] annotations = getter.getAnnotationInstances();
               
                if ( annotations != null )
                {
                    List formNames = getFormBeanNames( beanClass );
                   
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 )
View Full Code Here

        //
        MethodDeclaration[] methods = CompilerUtils.getClassMethods( jclass, null );
       
        for ( int i = 0; i < methods.length; i++ )
        {
            MethodDeclaration method = methods[i];
            isFormBeanClass |=
                checkValidationAnnotation( method, VALIDATABLE_PROPERTY_TAG_NAME, validatablePropertyGrammar );
            // We don't currently support validation rule annotations directly on getter methods.
            /*
            hasOne |= checkValidationAnnotation( method, LOCALE_RULES_ATTR, _validationLocaleRulesGrammar );
View Full Code Here

            // 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.
View Full Code Here

        // forwards, as appropriate.
        //
        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
                   
            //
View Full Code Here

        //
        MethodDeclaration[] methods = CompilerUtils.getClassMethods( jclass, null );
       
        for ( int i = 0; i < methods.length; i++ )
        {
            MethodDeclaration method = methods[i];
            TypeDeclaration declaringType = method.getDeclaringType();
           
            //
            // Only add diagnostics if the method is in this class, or if it's inherited from a class that's *not* on
            // sourcepath (i.e., its SourcePosition is null).
            //
View Full Code Here

    {
        MethodDeclaration[] actionMethods = CompilerUtils.getClassMethods( _jclass, ACTION_TAG_NAME );
       
        for ( int i = 0; i < actionMethods.length; i++ )
        {
            MethodDeclaration actionMethod = actionMethods[i];
           
            if ( ! actionMethod.hasModifier( Modifier.ABSTRACT ) )
            {
                ActionModel actionModel = new GenActionModel( actionMethod, this, _jclass );
                addActionMapping( actionModel );
                ParameterDeclaration[] params = actionMethod.getParameters();
               
                if ( params.length > 0 )
                {
                    ParameterDeclaration param1 = params[0];
                    TypeInstance paramType = param1.getType();
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

            // Check Forwards and Catches on action methods and exception-handler methods.
            //
            MethodDeclaration[] methods = decl.getMethods();
            for ( int i = 0; i < methods.length; i++ )
            {
                MethodDeclaration method = methods[i];
                AnnotationInstance ann = CompilerUtils.getAnnotation( method, ACTION_TAG_NAME);
                if ( ann == null ) ann = CompilerUtils.getAnnotation( method, EXCEPTION_HANDLER_TAG_NAME );
               
                if ( ann != null )
                {
                    List methodForwards = CompilerUtils.getAnnotationArray( ann, FORWARDS_ATTR, true );
                    String methodName = method.getSimpleName();
                   
                    if ( methodForwards != null )
                    {
                        for ( Iterator j = methodForwards.iterator(); j.hasNext(); )
                        {
View Full Code Here

            //
            MethodDeclaration[] methods = classDecl.getMethods();
           
            for ( int i = 0; i < methods.length; i++ )
            {
                MethodDeclaration method = methods[i];
                if ( method.getSimpleName().equals( actionName )
                     && CompilerUtils.getAnnotation( method, ACTION_TAG_NAME ) != null )
                {
                    return true;
                }
            }
View Full Code Here

TOP

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

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.