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 @NonNull Optional<TargetType> default @NonNull Optional<TargetType> default @NonNull Optional<TargetType> default @NonNull Optional<TargetType> Raw class, with erasure (List.classforList<UUID>, etc.)default @NonNull Optional<TargetType> getType()The original reflective type (Class,ParameterizedType, etc.)All type arguments wrapped (empty for raw/non-parameterized).isArray()isList()isMap()isSet()matchesClass(@NonNull Class<?> rawClass) matchesParameterizedType(@NonNull Class<?> rawClass, Class<?> @Nullable ... typeArguments) Does this instance match the given raw class and its parameterized type arguments?static @NonNull TargetType
-
Method Details
-
getType
-
getRawClass
@NonNull Class<?> getRawClass()Raw class, with erasure (List.classforList<UUID>, etc.) -
matchesClass
- Returns:
trueifgetRawClass()matches the providedrawClass(no subtype/parameter checks),falseotherwise.
-
matchesParameterizedType
default @NonNull Boolean matchesParameterizedType(@NonNull Class<?> rawClass, Class<?> @Nullable ... 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
-