Examples of TypeInstance


Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        }
        else
        {
            setReadonly( Boolean.valueOf( true ) );     // can't modify member state; mark as read-only
           
            TypeInstance formBeanType = CompilerUtils.getTypeInstance( annotation, USE_FORM_BEAN_TYPE_ATTR, true );
           
            if ( formBeanType != null )
            {
                setFormBeanName( addFormBean( formBeanType, parentApp ) );
            }
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        //
        // Only warn about nonserializable member data that's defined in this particular class.
        //
        if ( CompilerUtils.typesAreEqual( jclass, field.getDeclaringType() ) )
        {
            TypeInstance type = field.getType();
           
            if ( ! field.hasModifier( Modifier.TRANSIENT ) && ! field.hasModifier( Modifier.STATIC )
                 && type instanceof ClassType
                 && ! CompilerUtils.isAssignableFrom( SERIALIZABLE_CLASS_NAME, type, getEnv() ) )
            {
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        }
        else
        {
            setReadonly( Boolean.valueOf( true ) );     // can't modify member state; mark as read-only
           
            TypeInstance formBeanType = CompilerUtils.getTypeInstance( annotation, USE_FORM_BEAN_TYPE_ATTR, true );
           
            if ( formBeanType != null )
            {
                setFormBeanName( addFormBean( formBeanType, parentApp ) );
            }
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        {
            for ( Iterator i = sharedFlowRefs.iterator(); i.hasNext();
            {
                AnnotationInstance sharedFlowRef = ( AnnotationInstance ) i.next();
                String name = CompilerUtils.getString( sharedFlowRef, NAME_ATTR, true );
                TypeInstance type = CompilerUtils.getTypeInstance( sharedFlowRef, TYPE_ATTR, true );
               
                if ( type instanceof DeclaredType )   // if it's not a DeclaredType, the error will be caught elsewhere.
                {
                    TypeDeclaration typeDecl = ( ( DeclaredType ) type ).getDeclaration();
                   
                    if ( typeDecl != null )     // If the declaration is null, it's an error type.
                    {
                        _sharedFlowTypes.put( name, typeDecl );
                    }
                }
            }
        }
       
        //
        // If there's no SharedFlowController, fall back to the deprecated Global.app.
        //
        if ( _sharedFlowTypes.isEmpty() )
        {
            TypeDeclaration type = env.getTypeDeclaration( GLOBALAPP_FULL_CLASSNAME );
            if ( type != null ) _sharedFlowTypes.put( GLOBALAPP_SHARED_FLOW_NAME, type );
        }
 
        _sharedFlowTypeNames = new LinkedHashMap();
        _sharedFlowFiles = new LinkedHashMap();
       
        for ( Iterator i = _sharedFlowTypes.entrySet().iterator(); i.hasNext();
        {
            Map.Entry entry = ( Map.Entry ) i.next();
            TypeDeclaration type = ( TypeDeclaration ) entry.getValue();
            _sharedFlowTypeNames.put( entry.getKey(), type.getQualifiedName() );
            File file = CompilerUtils.getSourceFile( type, false );
           
            if ( file != null )
            {
                _sharedFlowFiles.put( entry.getKey(), file );
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

     * Add a return-action from an annotation.
     * @return the form bean type, or null</code> if there is no form bean.
     */
    public TypeInstance addReturnAction( String returnActionName, AnnotationInstance annotation, TypeDeclaration outerType )
    {
        TypeInstance formBeanType = CompilerUtils.getTypeInstance( annotation, OUTPUT_FORM_BEAN_TYPE_ATTR, true );
       
        if ( formBeanType == null )
        {
            String memberFieldName = CompilerUtils.getString( annotation, OUTPUT_FORM_BEAN_ATTR, true );
           
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        }
        else {
            // can't modify member state; mark as read-only
            setReadonly(Boolean.valueOf(true));

            TypeInstance formBeanType = CompilerUtils.getTypeInstance(annotation, USE_FORM_BEAN_TYPE_ATTR, true);
            if (formBeanType != null) {
                setFormBeanName(addFormBean(formBeanType, parent));
            }
        }
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        // If this is a return-action, store its info in the FlowControllerInfo (which is eventually provided to tools).
        //
        if ( isReturnAction )
        {
            TypeDeclaration outerType = CompilerUtils.getOuterClass( classMember );
            TypeInstance formBeanType =
                    getFlowControllerInfo().addReturnAction( ( String ) value.getValue(), annotation, outerType );
           
            if ( formBeanType != null && ! ( formBeanType instanceof DeclaredType ) )
            {
                addError( annotation, "error.action-invalid-form-bean-type", formBeanType.toString() );
            }
        }
    }
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

                    AnnotationInstance sharedFlowRef = ( AnnotationInstance ) ii.next();
                    if ( sharedFlowName.equals( CompilerUtils.getString( sharedFlowRef, NAME_ATTR, true ) ) )
                    {
                        foundOne = true;
                       
                        TypeInstance sfType = CompilerUtils.getTypeInstance( sharedFlowRef, TYPE_ATTR, true );
                        TypeInstance ft = field.getType();
                       
                        if ( ! ( sfType instanceof DeclaredType )
                             || ! CompilerUtils.isAssignableFrom( ft, ( ( DeclaredType ) sfType ).getDeclaration() ) )
                        {
                            getDiagnostics().addError(
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

                MethodDeclaration method = methods[i];
                if (method.getSimpleName().equals("validate")) {
                    ParameterDeclaration[] params = method.getParameters();
                   
                    if (params.length == 2) {
                        TypeInstance param1Type = params[0].getType();
                        TypeInstance param2Type = params[1].getType();
                       
                        if (param1Type instanceof DeclaredType && param2Type instanceof DeclaredType) {
                            TypeDeclaration param1Decl = ((DeclaredType) param1Type).getDeclaration();
                            TypeDeclaration param2Decl = ((DeclaredType) param2Type).getDeclaration();
                            TypeDeclaration actionMappingDecl = env.getTypeDeclaration(STRUTS_ACTION_MAPPING_CLASS_NAME);
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.TypeInstance

        String formBeanName = null;
       
        if ( params.length > 0 )
        {
            assert params.length == 1 : params.length;  // checker should catch this
            TypeInstance paramType = CompilerUtils.getGenericBoundsType( params[0].getType() );
            formBeanName = addFormBean( paramType, parentApp );
        }
       
        return formBeanName;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.