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

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


            {
                TypeInstance type = parameters[0].getType();
               
                if ( type instanceof ClassType )
                {
                    ClassDeclaration classDecl = ( ( ClassType ) type ).getClassTypeDeclaration();
                    if ( classDecl.getDeclaringType() == null ) addRulesFromBeanClass( classDecl );
                }
            }
        }
       
       
View Full Code Here


        // First go through the other classes in this package to look for other classes of this type.  Only one per
        // directory is allowed.
        //
        for ( int i = 0; i < packageClasses.length; i++ )
        {
            ClassDeclaration classDecl = packageClasses[i];
            if ( CompilerUtils.getAnnotation( classDecl, CONTROLLER_TAG_NAME ) != null
                 && CompilerUtils.isAssignableFrom( baseClass, classDecl, getEnv() ) )
            {
                File file = CompilerUtils.getSourceFile( classDecl, false );
               
View Full Code Here

        for ( Iterator ii = innerTypes.iterator(); ii.hasNext();
        {
            TypeDeclaration innerType = ( TypeDeclaration ) ii.next();
            if ( innerType instanceof ClassDeclaration )
            {
                ClassDeclaration innerClass = ( ClassDeclaration ) innerType;
               
                if ( innerType.hasModifier( Modifier.PUBLIC )
                     && CompilerUtils.isAssignableFrom( PAGEFLOW_FORM_CLASS_NAME, innerClass, _env ) )
                {
                    addFormBean( innerClass, null );
View Full Code Here

   
    private void getMessageResourcesFromForm( TypeDeclaration formTypeDecl, ActionModel actionModel )
    {
        if ( ! ( formTypeDecl instanceof ClassDeclaration ) ) return;
       
        ClassDeclaration formClassDecl = ( ClassDeclaration ) formTypeDecl;
       
        AnnotationInstance ann = CompilerUtils.getAnnotation( formClassDecl, FORM_BEAN_TAG_NAME, true );
       
        if ( ann != null )
        {
View Full Code Here

        if ( ! ( type instanceof ClassDeclaration ) )
        {
            return false;
        }
       
        ClassDeclaration classDecl = ( ClassDeclaration ) type;
       
        do
        {
            //
            // First look through the action methods.
            //
            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;
                }
            }
           
            //
            // Next, look through the simple actions (annotations).
            //
            Collection simpleActionAnnotations =
                CompilerUtils.getAnnotationArrayValue( classDecl, CONTROLLER_TAG_NAME, SIMPLE_ACTIONS_ATTR, true );
           
            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 ) )
                    {
                        return true;
                    }
                }
            }
           
            ClassType superType = classDecl.getSuperclass();
            classDecl = superType != null ? superType.getClassTypeDeclaration() : null;
        } while ( checkInheritedActions && classDecl != null );
       
       
        return false;
View Full Code Here

        if ( ! ( type instanceof ClassDeclaration ) )
        {
            return false;
        }
       
        ClassDeclaration classDecl = ( ClassDeclaration ) type;
       
        do
        {
            //
            // First look through the action methods.
            //
            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;
                }
            }
           
            ClassType superType = classDecl.getSuperclass();
            classDecl = superType != null ? superType.getClassTypeDeclaration() : null;
        } while ( classDecl != null );
       
        //
        // Next, look through the simple actions (annotations).
View Full Code Here

        // First go through the other classes in this package to look for other classes of this type.  Only one per
        // directory is allowed.
        //
        for ( int i = 0; i < packageClasses.length; i++ )
        {
            ClassDeclaration classDecl = packageClasses[i];
            if ( CompilerUtils.getAnnotation( classDecl, CONTROLLER_TAG_NAME ) != null
                 && CompilerUtils.isAssignableFrom( baseClass, classDecl, getEnv() ) )
            {
                File file = CompilerUtils.getSourceFile( classDecl, false );
               
View Full Code Here

            getDiagnostics().addError( jclass, "error.does-not-extend-base", FACES_BACKING_BEAN_CLASS );
            return null;
        }
       
        ClassDeclaration[] packageClasses = jclass.getPackage().getClasses();
        ClassDeclaration jpfClass = null;
       
        for ( int i = 0; i < packageClasses.length; i++ )
        {
            ClassDeclaration classDecl = packageClasses[i];
            if ( CompilerUtils.isPageFlowClass( classDecl, getEnv() ) ) jpfClass = classDecl;
        }
       
        FlowControllerInfo fcInfo = new FlowControllerInfo( jpfClass );
        fcInfo.startBuild( getEnv(), jpfClass );
View Full Code Here

    {
        assert _sourceFileInfo != null;     // process() should guarantee this.
       
        if ( decl instanceof ClassDeclaration )
        {
            ClassDeclaration classDecl = ( ClassDeclaration ) decl;
            BaseChecker checker = getChecker( classDecl, this );
           
            if ( checker != null )
            {
                checker.check( classDecl );
               
                //
                // Also do a silent check on all base classes.  We don't want to generate if there were errors
                // in the base class.
                //
                SilentDiagnostics silentDiagnostics = new SilentDiagnostics();
               
                for ( ClassType i = classDecl.getSuperclass(); i != null; i = i.getSuperclass() )
                {
                    ClassDeclaration baseDecl = i.getClassTypeDeclaration();
                   
                    if ( CompilerUtils.getSourceFile( baseDecl, false ) != null )
                    {
                        BaseChecker silentChecker = getChecker( baseDecl, silentDiagnostics );
                        if ( silentChecker != null ) silentChecker.check( baseDecl );
View Full Code Here

    {
        assert _sourceFileInfo != null;     // process() should guarantee this.
       
        if ( decl instanceof ClassDeclaration )
        {
            ClassDeclaration classDecl = ( ClassDeclaration ) decl;
            BaseGenerator generator = getGenerator( classDecl, this );
            if ( generator != null ) generator.generate( classDecl );
        }
    }
View Full Code Here

TOP

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

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.