Package org.hibernate.models.spi
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!!!
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault <S> Sdefault Set<ClassDetails> collectImplementors(String base, boolean includeBase) Walks the inheritance tree, starting frombase, "downward" calling the consumer for each subclass and interface which is directly an implementor.default Set<ClassDetails> collectImplementors(String base, boolean includeBase, Predicate<ClassDetails> exclusions) Walks the inheritance tree, starting frombase, "downward" calling the consumer for each subclass and interface which is directly an implementor.findClassDetails(String name) Find the managed-class with the givenname, if there is one.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.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).voidVisit each registered class detailsvoidforEachDirectImplementor(String interfaceName, ClassDetailsRegistry.ClassDetailsConsumer consumer) Visit each direct implementor, including specializations, of the named interface.voidforEachDirectSubtype(String typeName, ClassDetailsRegistry.ClassDetailsConsumer consumer) Visit each direct subtype of the named managed-classdefault voidforEachDirectSubType(String typeName, ClassDetailsRegistry.ClassDetailsConsumer consumer) Deprecated.Use forEachDirectSubtype(java.lang.String, org.hibernate.models.spi.ClassDetailsRegistry.ClassDetailsConsumer) instead.default ClassDetailsgetClassDetails(String name) Form offindClassDetails(java.lang.String)throwing an exception if no registration is foundAccess to the ClassDetailsBuilder used in this registrygetDirectImplementors(String interfaceName) Get the list of all direct implementors, including specializations, for the named interface.getDirectSubtypes(String superTypeName) Get the list of all direct subtypes for the named managed-class.getDirectSubTypes(String superTypeName) Deprecated.Use getDirectSubtypes(String) instead.booleanWhether this registry is tracking interface implementors.resolveClassDetails(String name) Resolves a managed-class by name.voidwalkConcreteTypes(String base, boolean includeBase, ClassDetailsRegistry.ClassDetailsConsumer consumer) Visit all concrete (non-abstract, non-interface) ClassDetails from the give base type.voidwalkImplementors(String base, boolean includeBase, ClassDetailsRegistry.ClassDetailsConsumer consumer) Walks the inheritance tree downward, starting frombase, calling the consumer for each subclass and interface which is directly an implementor.
-
Method Details
-
isTrackingImplementors
boolean isTrackingImplementors()Whether this registry is tracking interface implementors.- See Also:
-
resolveClassDetails
Resolves a managed-class by name. If there is currently no such registration, one is created. -
findClassDetails
Find the managed-class with the givenname, if there is one. Returnsnullif there are none registered with that name. -
getClassDetails
Form offindClassDetails(java.lang.String)throwing an exception if no registration is found- Throws:
UnknownClassException- If no registration is found with the givenname
-
forEachClassDetails
Visit each registered class details -
getDirectSubTypes
Deprecated.Use getDirectSubtypes(String) instead.Get the list of all direct subtypes for the named managed-class. -
getDirectSubtypes
Get the list of all direct subtypes for the named managed-class. -
forEachDirectSubType
@Deprecated default void forEachDirectSubType(String typeName, ClassDetailsRegistry.ClassDetailsConsumer consumer) Deprecated.Visit each direct subtype of the named managed-class -
forEachDirectSubtype
Visit each direct subtype of the named managed-class -
getDirectImplementors
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
interfaceNameactually 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
interfaceNameactually names an interface. If it does not, no callbacks will happen.
-
findConcreteTypes
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
baseis a concrete type, it will also be returned.
-
findConcreteTypes
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 includebaseif 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 includebaseif 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 frombase, calling the consumer for each subclass and interface which is directly an implementor.- Parameters:
base- The type from which to start.includeBase- Whether to includebaseif it is concrete type.consumer- The callback.- See Also:
-
collectImplementors
Walks the inheritance tree, starting frombase, "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 includebaseif it is concrete type.- See Also:
-
collectImplementors
@Incubating default Set<ClassDetails> collectImplementors(String base, boolean includeBase, Predicate<ClassDetails> exclusions) Walks the inheritance tree, starting frombase, "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 includebaseif 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
-