Class PageClassLoaderContext
java.lang.Object
org.apache.tapestry5.services.pageload.PageClassLoaderContext
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 -
Constructor Summary
ConstructorsConstructorDescriptionPageClassLoaderContext
(String name, PageClassLoaderContext parent, Set<String> classNames, PlasticProxyFactory plasticProxyFactory, Function<String, PageClassLoaderContext> provider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(PageClassLoaderContext context) Adds a child context.void
Adds a class to this context.boolean
findByClassName
(String className) Searches for the context that contains the given class in itself and recursivel in its children.Returns the children of this context.Returns the ClassLoader associated with this context.Returns the set of classes that belong in this context.Returns the set of descendents (children and their children recursively of this context.getName()
Returns the name of this context.Returns the parent of this context.Returns this context's PlasticManager instance.Returns this context's PlasticProxyFactory instance.int
hashCode()
void
Invalidates this context and its children recursively.final boolean
isEqualOrAncestor
(PageClassLoaderContext dependencyContext) boolean
isRoot()
Returns whether this is the root context.boolean
Returns whether this is theunknwon
context.void
removeChild
(PageClassLoaderContext context) Removes a child context.toRecursiveString
(boolean outputClasses) toString()
toString
(boolean includeClassNames)
-
Field Details
-
UNKOWN_CONTEXT_NAME
Name of theunknown
context (i.e. the one for controlled classes without dependency information at the moment).- See Also:
-
-
Constructor Details
-
PageClassLoaderContext
public PageClassLoaderContext(String name, PageClassLoaderContext parent, Set<String> classNames, PlasticProxyFactory plasticProxyFactory, Function<String, PageClassLoaderContext> provider)
-
-
Method Details
-
getName
Returns the name of this context. -
getParent
Returns the parent of this context. -
getClassNames
Returns the set of classes that belong in this context. -
getChildren
Returns the children of this context. -
getPlasticManager
Returns this context's PlasticManager instance. -
getProxyFactory
Returns this context's PlasticProxyFactory instance. -
addClass
Adds a class to this context. -
addChild
Adds a child context. -
removeChild
Removes a child context. -
findByClassName
Searches for the context that contains the given class in itself and recursivel in its children. -
getClassLoader
Returns the ClassLoader associated with this context. -
invalidate
Invalidates this context and its children recursively. This shouldn't be called directly, just throughPageClassLoaderContextManager.invalidate(PageClassLoaderContext...)
. -
isRoot
Returns whether this is the root context. -
isUnknown
Returns whether this is theunknwon
context.- See Also:
-
getDescendents
Returns the set of descendents (children and their children recursively of this context. -
hashCode
-
equals
-
toString
-
toString
-
toRecursiveString
-
toRecursiveString
-
isEqualOrAncestor
-