org.codehaus.groovy.runtime
Class GroovyCategorySupport
java.lang.Object
org.codehaus.groovy.runtime.GroovyCategorySupport
- public class GroovyCategorySupport
- extends java.lang.Object
- Author:
- sam
Field Summary |
private static java.lang.ThreadLocal |
local
|
Method Summary |
private static void |
endScope()
|
static java.util.List |
getCategoryMethods(java.lang.Class categorizedClass,
java.lang.String name)
This method is used to pull all the new methods out of the local thread context with a particular name. |
private static java.util.Map |
getMetaMethods(java.util.Map properties,
java.lang.Class metaClass)
|
private static java.util.List |
getMethodList(java.util.Map metaMethodsMap,
java.lang.String name)
|
private static java.util.Map |
getProperties()
|
private static void |
newScope()
|
private static void |
use(java.lang.Class categoryClass)
This method is delegated to from the global use(CategoryClass) method. |
static void |
use(java.lang.Class clazz,
Closure closure)
|
static void |
use(java.util.List classes,
Closure closure)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
local
private static java.lang.ThreadLocal local
GroovyCategorySupport
public GroovyCategorySupport()
getCategoryMethods
public static java.util.List getCategoryMethods(java.lang.Class categorizedClass,
java.lang.String name)
- This method is used to pull all the new methods out of the local thread context with a particular name.
- Parameters:
categorizedClass
- name
-
- Returns:
use
private static void use(java.lang.Class categoryClass)
- This method is delegated to from the global use(CategoryClass) method. It scans the Category class for static methods
that take 1 or more parameters. The first parameter is the class you are adding the category method to, additional parameters
are those paramteres needed by that method. A use statement cannot be undone and is valid only for the current thread.
- Parameters:
categoryClass
-
use
public static void use(java.lang.Class clazz,
Closure closure)
- Parameters:
clazz
- closure
-
use
public static void use(java.util.List classes,
Closure closure)
- Parameters:
classes
- closure
-
newScope
private static void newScope()
endScope
private static void endScope()
getProperties
private static java.util.Map getProperties()
getMethodList
private static java.util.List getMethodList(java.util.Map metaMethodsMap,
java.lang.String name)
- Parameters:
metaMethodsMap
-
- Returns:
getMetaMethods
private static java.util.Map getMetaMethods(java.util.Map properties,
java.lang.Class metaClass)
- Parameters:
properties
- metaClass
-
- Returns:
Copyright © 2003-2005 The Codehaus. All Rights Reserved.