Examples of TypeInstance


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

        setNullable( nullable );
       
        //
        // Get the base type, and add "[]" to it for arrays.
        //
        TypeInstance baseType = CompilerUtils.getReferenceType( annotation, TYPE_ATTR, true );
        StringBuffer arrayDimensions = new StringBuffer();
        while ( baseType instanceof ArrayType )
        {
            arrayDimensions.append( ARRAY_TYPE_SUFFIX );
            baseType = ( ( ArrayType ) baseType ).getComponentType();
        }
       
        String baseTypeName;
        if ( baseType instanceof PrimitiveType )
        {
            baseTypeName = ( ( PrimitiveType ) baseType ).getKind().toString().toLowerCase();
        }
        else
        {
            assert baseType instanceof DeclaredType : baseType.getClass().getName();   // checker should enforce this
            baseTypeName = CompilerUtils.getLoadableName( ( DeclaredType ) baseType );
        }
       
        setType( baseTypeName + arrayDimensions.toString() );
    }
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.