Package org.apache.tapestry5.services.pageload

# Class PageClassLoaderContext

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

public class PageClassLoaderContext extends 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 final String`
  `UNKOWN_CONTEXT_NAME`
  Name of the `unknown` context (i.e.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PageClassLoaderContext(String name, PageClassLoaderContext parent, Set<String> classNames, PlasticProxyFactory plasticProxyFactory, Function<String,PageClassLoaderContext> provider)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addChild(PageClassLoaderContext context)`
  Adds a child context.
  `void`
  `addClass(String className)`
  Adds a class to this context.
  `boolean`
  `equals(Object obj)`
  `PageClassLoaderContext`
  `findByClassName(String className)`
  Searches for the context that contains the given class in itself and recursivel in its children.
  `Set<PageClassLoaderContext>`
  `getChildren()`
  Returns the children of this context.
  `ClassLoader`
  `getClassLoader()`
  Returns the ClassLoader associated with this context.
  `Set<String>`
  `getClassNames()`
  Returns the set of classes that belong in this context.
  `Set<PageClassLoaderContext>`
  `getDescendents()`
  Returns the set of descendents (children and their children recursively of this context.
  `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.
  `final 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.
  `String`
  `toRecursiveString()`
  `String`
  `toRecursiveString(boolean outputClasses)`
  `String`
  `toString()`
  `String`
  `toString(boolean includeClassNames)`

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

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

- ## Field Details

  - ### UNKOWN_CONTEXT_NAME

    public static final 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 Details

  - ### PageClassLoaderContext

    public PageClassLoaderContext(String name, PageClassLoaderContext parent, Set<String> classNames, PlasticProxyFactory plasticProxyFactory, Function<String,PageClassLoaderContext> provider)

- ## Method Details

  - ### getName

    public String getName()
    Returns the name of this context.

  - ### getParent

    public PageClassLoaderContext getParent()
    Returns the parent of this context.

  - ### getClassNames

    public Set<String> getClassNames()
    Returns the set of classes that belong in this context.

  - ### getChildren

    public 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(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(String className)
    Searches for the context that contains the given class in itself and recursivel in its children.

  - ### getClassLoader

    public 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 Set<PageClassLoaderContext> getDescendents()
    Returns the set of descendents (children and their children recursively of this context.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toString

    public String toString(boolean includeClassNames)

  - ### toRecursiveString

    public String toRecursiveString()

  - ### toRecursiveString

    public String toRecursiveString(boolean outputClasses)

  - ### isEqualOrAncestor

    public final boolean isEqualOrAncestor(PageClassLoaderContext dependencyContext)