Package org.apache.jdo.model.java

Examples of org.apache.jdo.model.java.JavaType


        // return true if obj is this
        if (obj == this) return  true;
        // return false if obj does not have the correct type
        if ((obj == null) || !(obj instanceof JavaType)) return false;

        JavaType other = (JavaType)obj;
        // compare names
        String name = getName();
        if (name == null) return other.getName() == null;
        return name.equals(other.getName());
    }
View Full Code Here


     * <code>null</code> if it cannot be resolved.
     */
    public static JavaType resolveType(JDOModel jdoModel, String typeName,
                                       String packagePrefix)
    {
        JavaType type = null;
        JavaModel javaModel = jdoModel.getJavaModel();
        if (primitiveTypeNames.contains(typeName) ||
            (typeName.indexOf('.') != -1) ||
            (packagePrefix == null) || (packagePrefix.length() == 0)) {
            // Take the typeName as specified,
View Full Code Here

     * <code>false</code> otherwise.
     */
    public static boolean isValueArrayType(JavaType type)
    {
        if (type.isArray()) {
            JavaType elementType = type.getArrayComponentType();
            return elementType.isValue();
        }
        return false;
    }
View Full Code Here

     * <code>false</code> otherwise.
     */
    private static boolean isPersistenceArrayType(JavaType type)
    {
         if (type.isArray()) {
            JavaType elementType = type.getArrayComponentType();
            return elementType.isValue() ||
                   elementType.isPersistenceCapable();
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.apache.jdo.model.java.JavaType

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.