public static class GroovyCategorySupport.ThreadCategoryInfo
extends HashMap
Category methods active on one thread, keyed by method name.
Each use pushes a scope and pops it when the closure
finishes. Getters and setters are also indexed by property name.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public GroovyCategorySupport.CategoryMethodList |
getCategoryMethods(String name)Returns the category methods registered under name
while a scope is active. |
<T> |
public T |
use(List<Class> categoryClasses, Closure<T> closure)Opens a scope, installs the public static methods of each class in categoryClasses, and calls closure. |
| Methods inherited from class | Name |
|---|---|
class HashMap |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getClass, getOrDefault, hashCode, isEmpty, keySet, merge, notify, notifyAll, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values, wait, wait, wait |
Returns the category methods registered under name
while a scope is active.
name - method name to look upname, or null when this thread is not inside use
or no method of that name is registered Opens a scope, installs the public static methods of each class
in categoryClasses, and calls closure. The scope
is closed on the way out, including when the closure throws.
A method is installed only when it is public and static and has
at least one parameter; the first parameter type is the receiver.
Methods inherited from superclasses are installed too, stopping
before Object.
T - return type of closurecategoryClasses - classes that supply category methods, applied in orderclosure - called while those methods are visibleclosure