Interface TypeHierarchy.Lookup

All Superinterfaces:
Function<String, @Nullable io.micronaut.inject.ast.ClassElement>
Enclosing class:
TypeHierarchy
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface TypeHierarchy.Lookup extends Function<String, @Nullable io.micronaut.inject.ast.ClassElement>
Looks up what is known of a type the hierarchy names only by its name: the compiler's element, as a function of the binary name, and the definition of the model written with it - a member type naming its enclosing one, or a sibling by its simple name.
Since:
2.3
  • Field Details

  • Method Details

    • definition

      default @Nullable ObjectDef definition(String name)
      Parameters:
      name - The binary name of a definition, or the simple name of a member type
      Returns:
      The definition, or null
    • of

      static TypeHierarchy.Lookup of(@Nullable Function<String, @Nullable io.micronaut.inject.ast.ClassElement> classElements)
      Parameters:
      classElements - Looks up the element of a type by its binary name, or null
      Returns:
      The lookup of elements alone
    • of

      static TypeHierarchy.Lookup of(Function<String, @Nullable ObjectDef> definitions, @Nullable Function<String, @Nullable io.micronaut.inject.ast.ClassElement> classElements)
      Parameters:
      definitions - Looks up a definition by its binary name, or a member type by its simple name
      classElements - Looks up the element of a type by its binary name, or null
      Returns:
      The lookup of both