Interface ComponentDependencyRegistry
- All Known Implementing Classes:
ComponentDependencyRegistryImpl
public interface ComponentDependencyRegistry
Internal service that registers direct dependencies between components (including components, pages and
base classes). Even though methods receive
ComponentPageElement
parameters, dependencies
are tracked using their fully qualified classs names.- Since:
- 5.8.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum class defining the types of dependency components, pages and mixins can have among them. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears all dependency information.void
Clears all dependency information for a given component.void
clear
(ComponentPageElement componentPageElement) Clears all dependency information for a given component.boolean
Tells whether this registry already contans a given class name.void
Tells this service to ignore invalidations in this thread.void
Tells this service to stop ignoring invalidations in this thread.getAllNonPageDependencies
(String className) Returns all dependencies of a given class, direct and indirect.Returns the set of all class names in the registry.getDependencies
(String className, ComponentDependencyRegistry.DependencyType type) Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.getDependents
(String className) Returns the fully qualified names of the direct dependencies of a given component.Returns the set of all root classes (i.e.boolean
Returns whether stored dependency information is present.void
listen
(InvalidationEventHub invalidationEventHub) Signs up this registry to invalidation events from a given hub.void
Register all the dependencies of a given class.void
register
(Class<?> clasz, ClassLoader classLoader) Register all the dependencies of a given class and uses a given classloader to load other classes if needed.void
register
(ComponentPageElement componentPageElement) Register all the dependencies of a given component.void
register
(PlasticField plasticField, MutableComponentModel componentModel) Register a dependency of a component class with another through annotations such asInjectPage
,InjectComponent
andComponent
.void
Writes the current component dependency data to a file so it can be reused in a new run later.
-
Field Details
-
FILENAME
Default file where the dependency information is stored between webapp runs.- See Also:
-
-
Method Details
-
register
Register all the dependencies of a given class. -
register
Register all the dependencies of a given class and uses a given classloader to load other classes if needed.- Since:
- 5.8.7
-
register
Register all the dependencies of a given component. -
register
Register a dependency of a component class with another through annotations such asInjectPage
,InjectComponent
andComponent
. -
clear
Clears all dependency information for a given component. -
clear
Clears all dependency information for a given component. -
clear
void clear()Clears all dependency information. -
getDependents
Returns the fully qualified names of the direct dependencies of a given component. -
getDependencies
Returns the fully qualified names of the direct dependencies of a given component and a given dependency type. -
getAllNonPageDependencies
Returns all dependencies of a given class, direct and indirect.- Parameters:
className
- a class name.
-
listen
Signs up this registry to invalidation events from a given hub. -
writeFile
void writeFile()Writes the current component dependency data to a file so it can be reused in a new run later.- See Also:
-
contains
Tells whether this registry already contans a given class name. -
getClassNames
Returns the set of all class names in the registry. -
getRootClasses
Returns the set of all root classes (i.e. ones with no dependencies). -
isStoredDependencyInformationPresent
boolean isStoredDependencyInformationPresent()Returns whether stored dependency information is present. -
disableInvalidations
void disableInvalidations()Tells this service to ignore invalidations in this thread. -
enableInvalidations
void enableInvalidations()Tells this service to stop ignoring invalidations in this thread.
-