Package org.apache.tapestry5.services.pageload

## Class PageClassLoaderContext

- java.lang.Object
- - org.apache.tapestry5.services.pageload.PageClassLoaderContext

-     public class PageClassLoaderContext
      extends java.lang.Object

  Class that encapsulates a classloader context for Tapestry's live class reloading. Each instance contains basically a classloader, a set of classnames, a parent context (possibly null) and child contexts (possibly empty).

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `UNKOWN_CONTEXT_NAME` | Name of the `unknown` context (i.e.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PageClassLoaderContext​(java.lang.String name, PageClassLoaderContext parent, java.util.Set<java.lang.String> classNames, PlasticProxyFactory plasticProxyFactory, java.util.function.Function<java.lang.String,​PageClassLoaderContext> provider)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addChild​(PageClassLoaderContext context)` | Adds a child context.
    `void` | `addClass​(java.lang.String className)` | Adds a class to this context.
    `boolean` | `equals​(java.lang.Object obj)` |
    `PageClassLoaderContext` | `findByClassName​(java.lang.String className)` | Searches for the context that contains the given class in itself and recursivel in its children.
    `java.util.Set<PageClassLoaderContext>` | `getChildren()` | Returns the children of this context.
    `java.lang.ClassLoader` | `getClassLoader()` | Returns the ClassLoader associated with this context.
    `java.util.Set<java.lang.String>` | `getClassNames()` | Returns the set of classes that belong in this context.
    `java.util.Set<PageClassLoaderContext>` | `getDescendents()` | Returns the set of descendents (children and their children recursively of this context.
    `java.lang.String` | `getName()` | Returns the name of this context.
    `PageClassLoaderContext` | `getParent()` | Returns the parent of this context.
    `PlasticManager` | `getPlasticManager()` | Returns this context's PlasticManager instance.
    `PlasticProxyFactory` | `getProxyFactory()` | Returns this context's PlasticProxyFactory instance.
    `int` | `hashCode()` |
    `void` | `invalidate()` | Invalidates this context and its children recursively.
    `boolean` | `isEqualOrAncestor​(PageClassLoaderContext dependencyContext)` |
    `boolean` | `isRoot()` | Returns whether this is the root context.
    `boolean` | `isUnknown()` | Returns whether this is the `unknwon` context.
    `void` | `removeChild​(PageClassLoaderContext context)` | Removes a child context.
    `java.lang.String` | `toRecursiveString()` |
    `java.lang.String` | `toRecursiveString​(boolean outputClasses)` |
    `java.lang.String` | `toString()` |
    `java.lang.String` | `toString​(boolean includeClassNames)` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNKOWN_CONTEXT_NAME

          public static final java.lang.String UNKOWN_CONTEXT_NAME

      Name of the `unknown` context (i.e. the one for controlled classes without dependency information at the moment).
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PageClassLoaderContext

          public PageClassLoaderContext​(java.lang.String name,
                                        PageClassLoaderContext parent,
                                        java.util.Set<java.lang.String> classNames,
                                        PlasticProxyFactory plasticProxyFactory,
                                        java.util.function.Function<java.lang.String,​PageClassLoaderContext> provider)

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Returns the name of this context.

    - #### getParent

          public PageClassLoaderContext getParent()

      Returns the parent of this context.

    - #### getClassNames

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

      Returns the set of classes that belong in this context.

    - #### getChildren

          public java.util.Set<PageClassLoaderContext> getChildren()

      Returns the children of this context.

    - #### getPlasticManager

          public PlasticManager getPlasticManager()

      Returns this context's PlasticManager instance.

    - #### getProxyFactory

          public PlasticProxyFactory getProxyFactory()

      Returns this context's PlasticProxyFactory instance.

    - #### addClass

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

      Adds a class to this context.

    - #### addChild

          public void addChild​(PageClassLoaderContext context)

      Adds a child context.

    - #### removeChild

          public void removeChild​(PageClassLoaderContext context)

      Removes a child context.

    - #### findByClassName

          public PageClassLoaderContext findByClassName​(java.lang.String className)

      Searches for the context that contains the given class in itself and recursivel in its children.

    - #### getClassLoader

          public java.lang.ClassLoader getClassLoader()

      Returns the ClassLoader associated with this context.

    - #### invalidate

          public void invalidate()

      Invalidates this context and its children recursively. This shouldn't be called directly, just through `PageClassLoaderContextManager.invalidate(PageClassLoaderContext...)`.

    - #### isRoot

          public boolean isRoot()

      Returns whether this is the root context.

    - #### isUnknown

          public boolean isUnknown()

      Returns whether this is the `unknwon` context.
      See Also:
        `UNKOWN_CONTEXT_NAME`

    - #### getDescendents

          public java.util.Set<PageClassLoaderContext> getDescendents()

      Returns the set of descendents (children and their children recursively of this context.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString​(boolean includeClassNames)

    - #### toRecursiveString

          public java.lang.String toRecursiveString()

    - #### toRecursiveString

          public java.lang.String toRecursiveString​(boolean outputClasses)

    - #### isEqualOrAncestor

          public final boolean isEqualOrAncestor​(PageClassLoaderContext dependencyContext)