Example usage for Java org.springframework.core.convert TypeDescriptor fields, constructors, methods, implement or subclass
The text is from its open source code.
TypeDescriptor(MethodParameter methodParameter) Create a new type descriptor from a MethodParameter . | |
TypeDescriptor(Field field) Create a new type descriptor from a Field . | |
TypeDescriptor(Property property) Create a new type descriptor from a Property . |
TypeDescriptor | forObject(@Nullable Object source) Create a new type descriptor for an object. |
T | getAnnotation(Class Obtain the annotation of the specified annotationType that is on this type descriptor. |
TypeDescriptor | getElementTypeDescriptor() If this type is an array, returns the array's component type. |
TypeDescriptor | getMapKeyTypeDescriptor() If this type is a Map and its key type is parameterized, returns the map's key type. |
TypeDescriptor | getMapValueTypeDescriptor() If this type is a Map and its value type is parameterized, returns the map's value type. |
String | getName() Return the name of this type: the fully qualified class name. |
Class> | getObjectType() Variation of #getType() that accounts for a primitive type by returning its object wrapper type. |
ResolvableType | getResolvableType() Return the underlying ResolvableType . |
Class> | getType() The type of the backing class, method parameter, field, or property described by this TypeDescriptor. |
boolean | hasAnnotation(Class extends Annotation> annotationType) Determine if this type descriptor has the specified annotation. |
boolean | isArray() Is this type an array type? |
boolean | isAssignableTo(TypeDescriptor typeDescriptor) Returns true if an object of this type descriptor can be assigned to the location described by the given type descriptor. |
boolean | isCollection() Is this type a Collection type? |
boolean | isPrimitive() Is this type a primitive type? |
TypeDescriptor | narrow(@Nullable Object value) Narrows this TypeDescriptor by setting its type to the class of the provided value. |
TypeDescriptor | nested(MethodParameter methodParameter, int nestingLevel) Create a type descriptor for a nested type declared within the method parameter. |
TypeDescriptor | nested(Field field, int nestingLevel) Create a type descriptor for a nested type declared within the field. |
TypeDescriptor | nested(Property property, int nestingLevel) Create a type descriptor for a nested type declared within the property. |
TypeDescriptor | nested(TypeDescriptor typeDescriptor, int nestingLevel) |
TypeDescriptor | valueOf(@Nullable Class> type) Create a new type descriptor from the given type. |