TypeDefinition { public static TypeDefinition<?> getInstance(Type type) { return INSTANCES.getUnchecked(type); } protected  TypeDefinition(Type type); static TypeDefinition<?> getInstance(Type type); @SuppressWarnings("unchecked") static TypeDefinition<T> getInstance(Class<T> objectClass); @SuppressWarnings("unchecked") static TypeDefinition<T> getInstance(TypeReference<T> typeReference); Type getType(); @SuppressWarnings("unchecked") Class<T> getObjectClass(); List<Class<? super T>> getAssignableClasses(); Set<Class<?>> getAssignableClassesAndInterfaces(); List<Field> getAllFields(); Map<String, List<Field>> getAllSerializableFields(); Field getField(String name); Method getMethod(String name); List<Constructor<T>> getConstructors(); Constructor<T> getConstructor(Class<?>... parameterClasses); T newInstance(); List<Method> getAllMethods(); Map<String, Method> getAllGetters(); Map<String, Method> getAllSetters(); Class<?> getInferredGenericTypeArgumentClass(Class<?> superClass, int genericTypeArgumentIndex);  }
@Test public void test_getInstance() { TypeDefinition<Bar> typedef = TypeDefinition.getInstance(Bar.class); assertFalse(null == typedef); }
@Ignore @Test (expected=NullPointerException.class) public void test_getInstance_null() { TypeDefinition<Bar> typedef = TypeDefinition.getInstance((Class<Bar>)null); }