public final class TypeUtil extends Object
Types and derivatives. This class is adapted heavily from the
Spring Framework, specifically the
TypeUtils
class.Type,
GenericArrayType,
ParameterizedType,
WildcardType,
Class| Modifier and Type | Method | Description |
|---|---|---|
static List<Field> |
getAllDeclaredFields(Class<?> cls) |
Gets all declared fields for the given class (including superclasses).
|
static boolean |
isAssignable(Type lhs,
Type rhs) |
Indicates if two
Types are assignment compatible. |
public static List<Field> getAllDeclaredFields(Class<?> cls)
cls - the class to examineClass.getDeclaredFields()public static boolean isAssignable(Type lhs, Type rhs)
Types are assignment compatible.lhs - the left hand side to check assignability torhs - the right hand side to check assignability fromtrue if it is legal to assign a variable of type rhs to a variable of type lhsClass.isAssignableFrom(Class)Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.