Interface ClassDetailsRegistry

All Known Subinterfaces:
MutableClassDetailsRegistry
All Known Implementing Classes:
AbstractClassDetailsRegistry, ClassDetailsRegistryStandard

public interface ClassDetailsRegistry
Registry of all ClassDetails references
Implementation Specification:
Quite a few methods here are marked to ignore the fact that they are unused. The expectation is that most of these methods are used by consumers (Hibernate ORM, e.g.). DO NOT REMOVE THEM!!!
  • Method Details

    • isTrackingImplementors

      boolean isTrackingImplementors()
      Whether this registry is tracking interface implementors.
      See Also:
    • resolveClassDetails

      ClassDetails resolveClassDetails(String name)
      Resolves a managed-class by name. If there is currently no such registration, one is created.
    • findClassDetails

      ClassDetails findClassDetails(String name)
      Find the managed-class with the given name, if there is one. Returns null if there are none registered with that name.
    • getClassDetails

      default ClassDetails getClassDetails(String name)
      Form of findClassDetails(String) throwing an exception if no registration is found
      Throws:
      UnknownClassException - If no registration is found with the given name
    • forEachClassDetails

      void forEachClassDetails(ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Visit each registered class details
    • getDirectSubTypes

      @Deprecated List<ClassDetails> getDirectSubTypes(String superTypeName)
      Deprecated.
      Get the list of all direct subtypes for the named managed-class.
    • getDirectSubtypes

      Set<ClassDetails> getDirectSubtypes(String superTypeName)
      Get the list of all direct subtypes for the named managed-class.
    • forEachDirectSubType

      @Deprecated default void forEachDirectSubType(String typeName, ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Visit each direct subtype of the named managed-class
    • forEachDirectSubtype

      void forEachDirectSubtype(String typeName, ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Visit each direct subtype of the named managed-class
    • getDirectImplementors

      @Incubating Set<ClassDetails> getDirectImplementors(String interfaceName)
      Get the list of all direct implementors, including specializations, for the named interface.
      Returns:
      The direct implementors of the named interface.
      See Also:
      API Note:
      Does not verify that interfaceName actually names an interface.
    • forEachDirectImplementor

      @Incubating void forEachDirectImplementor(String interfaceName, ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Visit each direct implementor, including specializations, of the named interface.
      See Also:
      API Note:
      Does not verify that interfaceName actually names an interface. If it does not, no callbacks will happen.
    • findConcreteTypes

      @Incubating default Set<ClassDetails> findConcreteTypes(String base)
      Find all non-abstract ClassDetails which extended from or implements the named base type, which might be a class or interface.
      Parameters:
      base - The name of the class/interface from which to start walking.
      See Also:
      API Note:
      If base is a concrete type, it will also be returned.
    • findConcreteTypes

      @Incubating default Set<ClassDetails> findConcreteTypes(String base, boolean includeBase)
      Find ClassDetails for all non-abstract subtypes / implementors of the given base (which might be a class or interface).
      Parameters:
      base - The name of the class/interface from which to start walking.
      includeBase - Whether to include base if it is concrete type.
      See Also:
    • walkConcreteTypes

      @Incubating void walkConcreteTypes(String base, boolean includeBase, ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Visit all concrete (non-abstract, non-interface) ClassDetails from the give base type.
      Parameters:
      base - The name of the class/interface from which to start walking.
      includeBase - Whether to include base if it is concrete type.
      consumer - The callback for each concrete ClassDetails
    • walkImplementors

      @Incubating void walkImplementors(String base, boolean includeBase, ClassDetailsRegistry.ClassDetailsConsumer consumer)
      Walks the inheritance tree downward, starting from base, calling the consumer for each subclass and interface which is directly an implementor.
      Parameters:
      base - The type from which to start.
      includeBase - Whether to include base if it is concrete type.
      consumer - The callback.
      See Also:
    • collectImplementors

      @Incubating default Set<ClassDetails> collectImplementors(String base, boolean includeBase)
      Walks the inheritance tree, starting from base, "downward" calling the consumer for each subclass and interface which is directly an implementor.
      Parameters:
      base - The type from which to start.
      includeBase - Whether to include base if it is concrete type.
      See Also:
    • collectImplementors

      @Incubating default Set<ClassDetails> collectImplementors(String base, boolean includeBase, Predicate<ClassDetails> exclusions)
      Walks the inheritance tree, starting from base, "downward" calling the consumer for each subclass and interface which is directly an implementor.
      Parameters:
      base - The type from which to start.
      includeBase - Whether to include base if it is concrete type.
      exclusions - Exclusive check to filter ClassDetails out of the result.
      See Also:
    • getClassDetailsBuilder

      ClassDetailsBuilder getClassDetailsBuilder()
      Access to the ClassDetailsBuilder used in this registry
    • as

      default <S> S as(Class<S> type)