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> @NonNull Class<?> Raw class, with erasure (List.classforList<UUID>, etc.)default @NonNull Optional<TargetType> @NonNull TypegetType()The original reflective type (Class,ParameterizedType, etc.)@NonNull List<TargetType> All type arguments wrapped (empty for raw/non-parameterized).default @NonNull BooleanisArray()default @NonNull BooleanisList()default @NonNull BooleanisMap()default @NonNull BooleanisSet()default @NonNull BooleanmatchesClass(@NonNull Class<?> rawClass) default @NonNull BooleanmatchesParameterizedType(@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
@NonNull List<TargetType> getTypeArguments()All type arguments wrapped (empty for raw/non-parameterized). -
of
-