Interface JavaType
- All Known Implementing Classes:
BaseJavaType,JavaAnyType,JavaArrayType,JavaBooleanType,JavaEnumType,JavaIntegerType,JavaMapType,JavaNumericType,JavaObjectType,JavaStringType,NonGenericJavaType
public interface JavaType
-
Method Summary
Modifier and TypeMethodDescription<T> Tfold(Function<JavaArrayType, T> onArrayType, Function<JavaBooleanType, T> onBooleanType, Function<JavaEnumType, T> onEnumType, Function<JavaMapType, T> onMapType, Function<JavaAnyType, T> onAnyType, Function<JavaNumericType, T> onNumericType, Function<JavaIntegerType, T> onIntegerType, Function<JavaObjectType, T> onObjectType, Function<JavaStringType, T> onStringType) Returns the qualified classnames used for this type, including the classes of possible type parameters as well as possible api types.default PList<QualifiedClassName>default Optional<ParameterizedApiClassName>Returns the parameterized API classname of the java type if it has an api type.Returns the parameterized classname of the java type used internally.Returns the qualified classname of the java type used internally in the DTO for serialization and validation.default WriteableParameterizedClassNameReturns a writeable parameterized classname which gets rendered as api type if any or as normal type if not.default booleandefault booleandefault booleandefault booleandefault booleanReturns true if this type is a container type, i.e.default booleanbooleanReturns true in case this class is a java array (not to be confused with the openapi array-type).default booleandefault booleandefault booleandefault booleandefault booleandefault Optional<JavaArrayType>default Optional<JavaMapType>withNullability(Nullability nullability) static JavaTypewrap(Type type, TypeMappings typeMappings)
-
Method Details
-
wrap
-
getQualifiedClassName
QualifiedClassName getQualifiedClassName()Returns the qualified classname of the java type used internally in the DTO for serialization and validation. -
getApiType
-
hasApiTypeDeep
default boolean hasApiTypeDeep() -
hasNoApiTypeDeep
default boolean hasNoApiTypeDeep() -
getAllQualifiedClassNames
PList<QualifiedClassName> getAllQualifiedClassNames()Returns the qualified classnames used for this type, including the classes of possible type parameters as well as possible api types. -
getNullability
Nullability getNullability() -
withNullability
-
getParameterizedClassName
ParameterizedClassName getParameterizedClassName()Returns the parameterized classname of the java type used internally. -
getParameterizedApiClassName
Returns the parameterized API classname of the java type if it has an api type. -
getWriteableParameterizedClassName
Returns a writeable parameterized classname which gets rendered as api type if any or as normal type if not. -
isJavaArray
boolean isJavaArray()Returns true in case this class is a java array (not to be confused with the openapi array-type). -
getConstraints
Constraints getConstraints() -
fold
<T> T fold(Function<JavaArrayType, T> onArrayType, Function<JavaBooleanType, T> onBooleanType, Function<JavaEnumType, T> onEnumType, Function<JavaMapType, T> onMapType, Function<JavaAnyType, T> onAnyType, Function<JavaNumericType, T> onNumericType, Function<JavaIntegerType, T> onIntegerType, Function<JavaObjectType, T> onObjectType, Function<JavaStringType, T> onStringType) -
onArrayType
-
isArrayType
default boolean isArrayType() -
isNullableContainerValueType
default boolean isNullableContainerValueType() -
isNullableItemsArrayType
default boolean isNullableItemsArrayType() -
isNullableValuesMapType
default boolean isNullableValuesMapType() -
onMapType
-
isMapType
default boolean isMapType() -
isAnyType
default boolean isAnyType() -
isIntegerType
default boolean isIntegerType() -
isNumericType
default boolean isNumericType() -
isContainerType
default boolean isContainerType()Returns true if this type is a container type, i.e. a list or a map. -
getImports
-
getImportsAsString
-