Interface TargetType
public interface TargetType
A developer-friendly view over a reflective
Type
used by the ResultSet
-mapping pipeline for standard ResultSetMapper
instances.- Since:
- 3.0.0
- Author:
- Mark Allen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional
<TargetType> default Optional
<TargetType> default Optional
<TargetType> default Optional
<TargetType> Class
<?> Raw class, with erasure (List.class
forList<UUID>
, etc.)default Optional
<TargetType> getType()
The original reflective type (Class
,ParameterizedType
, etc.)All type arguments wrapped (empty for raw/non-parameterized).default Boolean
isArray()
default Boolean
isList()
default Boolean
isMap()
default Boolean
isSet()
default Boolean
matchesClass
(Class<?> rawClass) default Boolean
matchesParameterizedType
(Class<?> rawClass, Class<?>... typeArguments) Does this instance match the given raw class and its parameterized type arguments?static TargetType
-
Method Details
-
getType
-
getRawClass
Raw class, with erasure (List.class
forList<UUID>
, etc.) -
matchesClass
- Returns:
true
ifgetRawClass()
matches the providedrawClass
(no subtype/parameter checks),false
otherwise.
-
matchesParameterizedType
@Nonnull default Boolean matchesParameterizedType(@Nonnull Class<?> rawClass, @Nullable Class<?>... typeArguments) Does this instance match the given raw class and its parameterized type arguments?For example, invoke
matchesParameterizedType(List.class, UUID.class)
to determine "is this type aList<UUID>
?" -
isList
-
getListElementType
-
isSet
-
getSetElementType
-
isMap
-
getMapKeyType
-
getMapValueType
-
isArray
-
getArrayComponentType
-
getTypeArguments
All type arguments wrapped (empty for raw/non-parameterized). -
of
-