Package com.github.antlrjavaparser.api.type

Examples of com.github.antlrjavaparser.api.type.PrimitiveType


            final ClassOrInterfaceType cType2 = (ClassOrInterfaceType) type2;
            return cType.getName().equals(cType2.getName());

        }
        else if (type instanceof PrimitiveType) {
            final PrimitiveType pType = (PrimitiveType) type;
            final PrimitiveType pType2 = (PrimitiveType) type2;
            return pType.getType() == pType2.getType();

        }
        else if (type instanceof VoidType) {
            return true;
        }
View Full Code Here


                internalType = ((ReferenceType) internalType).getType();
            }
        }

        if (internalType instanceof PrimitiveType) {
            final PrimitiveType pt = (PrimitiveType) internalType;
            if (pt.getType().equals(Primitive.Boolean)) {
                return new JavaType(Boolean.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Char)) {
                return new JavaType(Character.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Byte)) {
                return new JavaType(Byte.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Short)) {
                return new JavaType(Short.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Int)) {
                return new JavaType(Integer.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Long)) {
                return new JavaType(Long.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Float)) {
                return new JavaType(Float.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            if (pt.getType().equals(Primitive.Double)) {
                return new JavaType(Double.class.getName(), array,
                        DataType.PRIMITIVE, null, null);
            }
            throw new IllegalStateException("Unsupported primitive '"
                    + pt.getType() + "'");
        }

        if (internalType instanceof WildcardType) {
            // We only provide very primitive support for wildcard types; Roo
            // only needs metadata at the end of the day,
View Full Code Here

                "Java type must be primitive to be presented to this method");
        if (javaType.equals(JavaType.VOID_PRIMITIVE)) {
            return new VoidType();
        }
        else if (javaType.equals(JavaType.BOOLEAN_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Boolean);
        }
        else if (javaType.equals(JavaType.BYTE_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Byte);
        }
        else if (javaType.equals(JavaType.CHAR_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Char);
        }
        else if (javaType.equals(JavaType.DOUBLE_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Double);
        }
        else if (javaType.equals(JavaType.FLOAT_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Float);
        }
        else if (javaType.equals(JavaType.INT_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Int);
        }
        else if (javaType.equals(JavaType.LONG_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Long);
        }
        else if (javaType.equals(JavaType.SHORT_PRIMITIVE)) {
            return new PrimitiveType(Primitive.Short);
        }
        throw new IllegalStateException("Unknown primitive " + javaType);
    }
View Full Code Here

TOP

Related Classes of com.github.antlrjavaparser.api.type.PrimitiveType

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.