Package io.micronaut.openapi.visitor
Class ElementUtils
java.lang.Object
io.micronaut.openapi.visitor.ElementUtils
Some util methods.
- Since:
- 4.8.3
-
Field Summary
FieldsModifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isContainerType
(io.micronaut.inject.ast.ClassElement type) Checking if the type is container.static boolean
isFileUpload
(io.micronaut.inject.ast.ClassElement type) Checking if the type is file upload type.static boolean
isNullable
(io.micronaut.inject.ast.TypedElement element) Checks Nullable annotions / optinal type to understand that the element can be null.static boolean
isReactiveAndVoid
(io.micronaut.inject.ast.ClassElement type) Checking if the type is void.static boolean
isReturnTypeFile
(io.micronaut.inject.ast.ClassElement type) Checking if the type is file.static boolean
isVoid
(io.micronaut.inject.ast.ClassElement type) Checking if the type is void.
-
Field Details
-
CONTAINER_TYPES
-
FILE_TYPES
-
VOID_TYPES
-
-
Method Details
-
isNullable
public static boolean isNullable(io.micronaut.inject.ast.TypedElement element) Checks Nullable annotions / optinal type to understand that the element can be null.- Parameters:
element
- typed element- Returns:
- true if element is nullable, false - otherwise.
-
isFileUpload
public static boolean isFileUpload(io.micronaut.inject.ast.ClassElement type) Checking if the type is file upload type.- Parameters:
type
- type element- Returns:
- true if this type one of known file upload types
-
isReturnTypeFile
public static boolean isReturnTypeFile(io.micronaut.inject.ast.ClassElement type) Checking if the type is file.- Parameters:
type
- type element- Returns:
- true if this type assignable with known file types
-
isContainerType
public static boolean isContainerType(io.micronaut.inject.ast.ClassElement type) Checking if the type is container.- Parameters:
type
- type element- Returns:
- true if this type assignable with known container types
-
isVoid
public static boolean isVoid(io.micronaut.inject.ast.ClassElement type) Checking if the type is void.- Parameters:
type
- type element- Returns:
- true if this type assignable with known void types
-
isReactiveAndVoid
public static boolean isReactiveAndVoid(io.micronaut.inject.ast.ClassElement type) Checking if the type is void.- Parameters:
type
- type element- Returns:
- true if this type assignable with known container and type argument is void
-