Package org.apache.tapestry5.internal.services

## Class ComponentDependencyRegistryImpl

- java.lang.Object
- - org.apache.tapestry5.internal.services.ComponentDependencyRegistryImpl

- All Implemented Interfaces:
    `ComponentDependencyRegistry`

      public class ComponentDependencyRegistryImpl
      extends java.lang.Object
      implements ComponentDependencyRegistry

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tapestry5.internal.services.ComponentDependencyRegistry

      `ComponentDependencyRegistry.DependencyType`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.tapestry5.internal.services.ComponentDependencyRegistry

      `FILENAME`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ComponentDependencyRegistryImpl​(PageClassLoaderContextManager pageClassLoaderContextManager, PlasticManager plasticManager, ComponentClassResolver componentClassResolver, TemplateParser templateParser, ComponentTemplateLocator componentTemplateLocator, java.lang.String componentDependencyFile, boolean productionMode)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clear()` | Clears all dependency information.
    `void` | `clear​(java.lang.String className)` | Clears all dependency information for a given component.
    `void` | `clear​(ComponentPageElement component)` | Clears all dependency information for a given component.
    `boolean` | `contains​(java.lang.String className)` | Tells whether this registry already contans a given class name.
    `void` | `disableInvalidations()` | Tells this service to ignore invalidations in this thread.
    `void` | `enableInvalidations()` | Tells this service to stop ignoring invalidations in this thread.
    `java.util.Set<java.lang.String>` | `getAllNonPageDependencies​(java.lang.String className)` | Returns all dependencies of a given class, direct and indirect.
    `java.util.Set<java.lang.String>` | `getClassNames()` | Returns the set of all class names in the registry.
    `java.util.Set<java.lang.String>` | `getDependencies​(java.lang.String className, ComponentDependencyRegistry.DependencyType type)` | Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.
    `java.util.Set<java.lang.String>` | `getDependents​(java.lang.String className)` | Returns the fully qualified names of the direct dependencies of a given component.
    `java.util.Set<java.lang.String>` | `getRootClasses()` | Returns the set of all root classes (i.e.
    `boolean` | `isStoredDependencyInformationPresent()` | Returns whether stored dependency information is present.
    `void` | `listen​(InvalidationEventHub invalidationEventHub)` | Signs up this registry to invalidation events from a given hub.
    `void` | `register​(java.lang.Class<?> component)` | Register all the dependencies of a given class.
    `void` | `register​(java.lang.Class<?> component, java.lang.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 as `InjectPage`, `InjectComponent` and `Component`.
    `void` | `setupThreadCleanup​(PerthreadManager perthreadManager)` |
    `void` | `writeFile()` | Writes the current component dependency data to a file so it can be reused in a new run later.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ComponentDependencyRegistryImpl

          public ComponentDependencyRegistryImpl​(PageClassLoaderContextManager pageClassLoaderContextManager,
                                                 PlasticManager plasticManager,
                                                 ComponentClassResolver componentClassResolver,
                                                 TemplateParser templateParser,
                                                 ComponentTemplateLocator componentTemplateLocator,
                                                 @Symbol("tapestry.component-dependency-file")
                                                 java.lang.String componentDependencyFile,
                                                 @Symbol("tapestry.production-mode")
                                                 boolean productionMode)

  - ### Method Detail

    - #### setupThreadCleanup

          public void setupThreadCleanup​(PerthreadManager perthreadManager)

    - #### register

          public void register​(java.lang.Class<?> component)

      Description copied from interface: `ComponentDependencyRegistry`
      Register all the dependencies of a given class.
      Specified by:
        `register` in interface `ComponentDependencyRegistry`

    - #### register

          public void register​(java.lang.Class<?> component,
                               java.lang.ClassLoader classLoader)

      Description copied from interface: `ComponentDependencyRegistry`
      Register all the dependencies of a given class and uses a given classloader to load other classes if needed.
      Specified by:
        `register` in interface `ComponentDependencyRegistry`

    - #### register

          public void register​(ComponentPageElement componentPageElement)

      Description copied from interface: `ComponentDependencyRegistry`
      Register all the dependencies of a given component.
      Specified by:
        `register` in interface `ComponentDependencyRegistry`

    - #### register

          public void register​(PlasticField plasticField,
                               MutableComponentModel componentModel)

      Description copied from interface: `ComponentDependencyRegistry`
      Register a dependency of a component class with another through annotations such as `InjectPage`, `InjectComponent` and `Component`.
      Specified by:
        `register` in interface `ComponentDependencyRegistry`

    - #### clear

          public void clear​(java.lang.String className)

      Description copied from interface: `ComponentDependencyRegistry`
      Clears all dependency information for a given component.
      Specified by:
        `clear` in interface `ComponentDependencyRegistry`

    - #### clear

          public void clear​(ComponentPageElement component)

      Description copied from interface: `ComponentDependencyRegistry`
      Clears all dependency information for a given component.
      Specified by:
        `clear` in interface `ComponentDependencyRegistry`

    - #### clear

          public void clear()

      Description copied from interface: `ComponentDependencyRegistry`
      Clears all dependency information.
      Specified by:
        `clear` in interface `ComponentDependencyRegistry`

    - #### getDependents

          public java.util.Set<java.lang.String> getDependents​(java.lang.String className)

      Description copied from interface: `ComponentDependencyRegistry`
      Returns the fully qualified names of the direct dependencies of a given component.
      Specified by:
        `getDependents` in interface `ComponentDependencyRegistry`

    - #### getDependencies

          public java.util.Set<java.lang.String> getDependencies​(java.lang.String className,
                                                                 ComponentDependencyRegistry.DependencyType type)

      Description copied from interface: `ComponentDependencyRegistry`
      Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.
      Specified by:
        `getDependencies` in interface `ComponentDependencyRegistry`
      See Also:
        `ComponentDependencyRegistry.DependencyType`

    - #### getAllNonPageDependencies

          public java.util.Set<java.lang.String> getAllNonPageDependencies​(java.lang.String className)

      Description copied from interface: `ComponentDependencyRegistry`
      Returns all dependencies of a given class, direct and indirect.
      Specified by:
        `getAllNonPageDependencies` in interface `ComponentDependencyRegistry`
      Parameters:
        `className` - a class name.

    - #### listen

          public void listen​(InvalidationEventHub invalidationEventHub)

      Description copied from interface: `ComponentDependencyRegistry`
      Signs up this registry to invalidation events from a given hub.
      Specified by:
        `listen` in interface `ComponentDependencyRegistry`

    - #### writeFile

          public void writeFile()

      Description copied from interface: `ComponentDependencyRegistry`
      Writes the current component dependency data to a file so it can be reused in a new run later.
      Specified by:
        `writeFile` in interface `ComponentDependencyRegistry`
      See Also:
        `ComponentDependencyRegistry.FILENAME`

    - #### contains

          public boolean contains​(java.lang.String className)

      Description copied from interface: `ComponentDependencyRegistry`
      Tells whether this registry already contans a given class name.
      Specified by:
        `contains` in interface `ComponentDependencyRegistry`

    - #### getClassNames

          public java.util.Set<java.lang.String> getClassNames()

      Description copied from interface: `ComponentDependencyRegistry`
      Returns the set of all class names in the registry.
      Specified by:
        `getClassNames` in interface `ComponentDependencyRegistry`

    - #### getRootClasses

          public java.util.Set<java.lang.String> getRootClasses()

      Description copied from interface: `ComponentDependencyRegistry`
      Returns the set of all root classes (i.e. ones with no dependencies).
      Specified by:
        `getRootClasses` in interface `ComponentDependencyRegistry`

    - #### isStoredDependencyInformationPresent

          public boolean isStoredDependencyInformationPresent()

      Description copied from interface: `ComponentDependencyRegistry`
      Returns whether stored dependency information is present.
      Specified by:
        `isStoredDependencyInformationPresent` in interface `ComponentDependencyRegistry`

    - #### disableInvalidations

          public void disableInvalidations()

      Description copied from interface: `ComponentDependencyRegistry`
      Tells this service to ignore invalidations in this thread.
      Specified by:
        `disableInvalidations` in interface `ComponentDependencyRegistry`

    - #### enableInvalidations

          public void enableInvalidations()

      Description copied from interface: `ComponentDependencyRegistry`
      Tells this service to stop ignoring invalidations in this thread.
      Specified by:
        `enableInvalidations` in interface `ComponentDependencyRegistry`