Class ElementUtils

java.lang.Object
io.micronaut.openapi.visitor.ElementUtils

@Internal public final class ElementUtils extends Object
Some util methods.
Since:
4.8.3
  • Field Details

    • CONTAINER_TYPES

      public static final List<String> CONTAINER_TYPES
    • FILE_TYPES

      public static final List<String> FILE_TYPES
    • VOID_TYPES

      public static final List<String> 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.
    • 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