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.classforList<UUID>, etc.)default Optional<TargetType> getType()The original reflective type (Class,ParameterizedType, etc.)All type arguments wrapped (empty for raw/non-parameterized).default BooleanisArray()default BooleanisList()default BooleanisMap()default BooleanisSet()default BooleanmatchesClass(Class<?> rawClass) default BooleanmatchesParameterizedType(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.classforList<UUID>, etc.) -
matchesClass
- Returns:
trueifgetRawClass()matches the providedrawClass(no subtype/parameter checks),falseotherwise.
-
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
-