<p>
Retrieves the <tt>TypeDef</tt> object corresponding with the given class.
</p>

@param typeClass the class which TypeDef must be obtained.
@return the TypeDef
517717
public static TypeDef forClass(final Class<?> typeClass) {
        
        Utils.validateNotNull(typeClass, "Class cannot be null");
        Utils.validateIsTrue(!typeClass.isArray(), "Cannot obtain TypeDef from array class");
        
        final TypeDefRegistry typeDefRegistry = TypeDefRegistry.getInstance();
        return typeDefRegistry.forClass(typeClass);
        
    }
1187939
public static String getDescriptor(final Class<?> c) {
		StringBuilder sb = new StringBuilder();
        getDescriptor(sb, c);
        return sb.toString();
    }
1276898
public static Class getTypeClass(Type type)
    {
        Class typeClassClass = null;

        if (type instanceof Class) {
            typeClassClass = (Class) type;
        } else if (type instanceof ParameterizedType) {
            typeClassClass = (Class) ((ParameterizedType) type).getRawType();
        } else if (type instanceof GenericArrayType) {
            Class<?> arrrayParameter = getTypeClass(((GenericArrayType) type).getGenericComponentType());
            if (arrrayParameter != null) {
                typeClassClass = Array.newInstance(arrrayParameter, 0).getClass();
            }
        }

        return typeClassClass;
    }
27365
public <T> boolean registerPojo(Class<T> typeClass)
    {
        assert typeClass != null;

        final HasSchema<?> last = pojoMapping.putIfAbsent(typeClass.getName(),
                new LazyRegister<T>(typeClass, this));
        
        return last == null || (last instanceof LazyRegister);
    }
1326631
private static String getTypeDescription(ClassNode c, boolean end) {
        ClassNode d = c;
        if (ClassHelper.isPrimitiveType(d.redirect())) {
            d = d.redirect();
        }

        String desc = TypeUtil.getDescriptionByType(d);

        if (!end && desc.endsWith(";")) {
            desc = desc.substring(0, desc.length() - 1);
        }

        return desc;
    }
1160490
protected static TypeReference getTypeReference(Class aClass) throws MovieDbException {
        if (TYPE_REFS.containsKey(aClass)) {
            return TYPE_REFS.get(aClass);
        } else {
            throw new MovieDbException(ApiExceptionType.UNKNOWN_CAUSE, "Class type reference for '" + aClass.getSimpleName() + "' not found!");
        }
    }
701967
@SuppressWarnings("unchecked")
    public <T extends Type> T resolve(Class<T> typeClass, String fullyQualifiedName) {
        Type result = resolve(fullyQualifiedName);
        if (result == null) {
            return null;
        }
        if (typeClass.isAssignableFrom(result.getClass())) {
            return (T) result;
        }
        throw new ClassCastException(result.getClass() + " cannot be cast to " + typeClass);
    }
1114488
@Override
    public final Class<T> returnedClass() {
        @SuppressWarnings("unchecked")Class<T> result = (Class<T>) TypeHelper.getTypeArguments(AbstractColumnMapper.class, getClass()).get(0);
        return result;
    }
904070
public static Type getType(final Class c) {
        if (c.isPrimitive()) {
            if (c == Integer.TYPE) {
                return INT_TYPE;
            } else if (c == Void.TYPE) {
                return VOID_TYPE;
            } else if (c == Boolean.TYPE) {
                return BOOLEAN_TYPE;
            } else if (c == Byte.TYPE) {
                return BYTE_TYPE;
            } else if (c == Character.TYPE) {
                return CHAR_TYPE;
            } else if (c == Short.TYPE) {
                return SHORT_TYPE;
            } else if (c == Double.TYPE) {
                return DOUBLE_TYPE;
            } else if (c == Float.TYPE) {
                return FLOAT_TYPE;
            } else /* if (c == Long.TYPE) */{
                return LONG_TYPE;
            }
        } else {
            return getType(getDescriptor(c));
        }
    }
477714
public static Class getClass(String typeStr) {
        Class clazz = ReflectCache.getClassCache(typeStr);
        if (clazz == null) {
            if ("void".equals(typeStr)) {
                clazz = void.class;
            } else if ("boolean".equals(typeStr)) {
                clazz = boolean.class;
            } else if ("byte".equals(typeStr)) {
                clazz = byte.class;
            } else if ("char".equals(typeStr)) {
                clazz = char.class;
            } else if ("double".equals(typeStr)) {
                clazz = double.class;
            } else if ("float".equals(typeStr)) {
                clazz = float.class;
            } else if ("int".equals(typeStr)) {
                clazz = int.class;
            } else if ("long".equals(typeStr)) {
                clazz = long.class;
            } else if ("short".equals(typeStr)) {
                clazz = short.class;
            } else {
                String jvmName = canonicalNameToJvmName(typeStr);
                clazz = ClassUtils.forName(jvmName);
            }
            ReflectCache.putClassCache(typeStr, clazz);
        }
        return clazz;
    }
77163
static <T> HasSchema<T> getSchemaWrapper(Class<T> typeClass)
    {
        return getSchemaWrapper(typeClass, ID_STRATEGY);
    }
198903
public int getTypeId(Class classType) {

        final Class origType = classType;
        while (null != classType) {
            Integer typeObj = (Integer) _typeMap.get(classType);
            if (null != typeObj) {
                return typeObj.intValue();
            }
            classType = classType.getSuperclass();
        }

        //
        // special check for blobs/clobs they are interfaces not derived from
        //
        if (Blob.class.isAssignableFrom(origType)) {
            return _typeMap.get(Blob.class).intValue();
        } else if (Clob.class.isAssignableFrom(origType)) {
            return _typeMap.get(Clob.class).intValue();
        }

        return TYPE_UNKNOWN;
    }
570861
@SuppressWarnings("rawtypes")
	public static Class getTypeClass(String type) throws ClassNotFoundException{
		Class clazz = null;
		if(type.equals("int")){
			clazz = int.class;
		} else if(type.equals("boolean")){
			clazz = boolean.class;
		} else if(type.equals("float")){
			clazz = float.class;
		} else if(type.equals("double")){
			clazz = double.class;
		} else if(type.equals("short")){
			clazz = short.class;
		} else if(type.equals("char")){
			clazz = char.class;
		} else if(type.equals("long")){
			clazz = long.class;
		} else if(type.equals("byte")){
			clazz = byte.class;
		} else {
			clazz = Class.forName(type);
		}
		return clazz;
	}
356901
public static Class<?> getColumnClass(CmsDataViewColumn.Type type) {

        if (type == Type.imageType) {
            return Component.class;
        } else {
            return type.getValueClass();
        }
    }
974367
public static TypeDef typeExtends(TypeDef base, ClassRef superClass) {
        return new TypeDefBuilder(base)
                .withExtendsList(superClass)
                .build();
    }
387680
@SuppressWarnings("unchecked")
  public static <T> TypeLiteral<T> get(Class<T> type, Type... parameters) {
    return (TypeLiteral<T>) TypeLiteral.get(new ParameterizedTypeImpl(type, parameters));
  }
355592
public Class getTypeClass() {
        try {
            return Class.forName(s.getContract().getClassNameForEntity(s.getName()));
        }
        catch (Exception e) {
            throw new RuntimeException(e);
        }
    }