org.xenei.jena.entities.impl
Class TypeChecker
java.lang.Object
org.xenei.jena.entities.impl.TypeChecker
public class TypeChecker
- extends Object
A utility class to verify that an instance of one class can be set with an instance of another.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeChecker
public TypeChecker()
canBeSetFrom
public static boolean canBeSetFrom(Class<?> a,
Class<?> b)
- True if "a" can be set from "b"
- Parameters:
a - b -
- Returns:
- true if an instance of a can be set with an instance of b
getPrimitiveClass
public static Class<?> getPrimitiveClass(Class<?> clazz)
- Get the primitive class that is equivalent to clazz.
If clazz is a primitive returns clazz.
If clazz does not wrap a primitive returns null.
- Parameters:
clazz - the class to unwrap.
- Returns:
- The primitive class or null.
Copyright © 2012 XENEI.com. All Rights Reserved.