Package org.mapstruct.ap.internal.util
Class NativeTypes
java.lang.Object
org.mapstruct.ap.internal.util.NativeTypes
Provides functionality around the Java primitive data types and their wrapper types. They are considered native.
- Author:
- Gunnar Morling
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?> getLiteral(String className, String literal) static StringThe name that should be used for thetypeKind.static Class<?> getPrimitiveType(Class<?> clazz) static Class<?> getWrapperType(Class<?> clazz) static booleanisNarrowing(String sourceFQN, String targetFQN) static booleanstatic boolean
-
Method Details
-
getWrapperType
-
getPrimitiveType
-
isNative
-
isNumber
-
getLiteral
- Parameters:
className- FQN of the literal native classliteral- literal to verify- Returns:
- literal class when the literal is a proper literal for the provided kind.
- Throws:
IllegalArgumentException- when the literal does not match to the provided native type className
-
getName
The name that should be used for thetypeKind. Should be used in order to get the name of a primitive type- Parameters:
typeKind- the type kind- Returns:
- the name that should be used for the
typeKind
-
isNarrowing
-