org.codehaus.groovy.runtime
Class GroovyCategorySupport

java.lang.Object
  extended by org.codehaus.groovy.runtime.GroovyCategorySupport

public class GroovyCategorySupport
extends java.lang.Object

Author:
sam, Paul King

Constructor Summary
GroovyCategorySupport()
           
 
Method Summary
static java.util.List getCategoryMethods(java.lang.Class categorizedClass)
          This method is used to pull all the new methods out of the local thread context.
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.
static boolean hasCategoryInAnyThread()
           
static void use(java.lang.Class categoryClass, Closure closure)
          Create a scope based on given categoryClass and invoke closure within that scope.
static void use(java.util.List categoryClasses, Closure closure)
          Create a scope based on given categoryClasses and invoke closure within that scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyCategorySupport

public GroovyCategorySupport()
Method Detail

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 - a class subject to the category methods in the thread context
name - the method name of interest
Returns:
the list of methods

getCategoryMethods

public static java.util.List getCategoryMethods(java.lang.Class categorizedClass)
This method is used to pull all the new methods out of the local thread context.

Parameters:
categorizedClass - a class subject to the category methods in the thread context
Returns:
the list of methods

use

public static void use(java.lang.Class categoryClass,
                       Closure closure)
Create a scope based on given categoryClass and invoke closure within that scope.

Parameters:
categoryClass - the class containing category methods
closure - the closure during which to make the category class methods available

use

public static void use(java.util.List categoryClasses,
                       Closure closure)
Create a scope based on given categoryClasses and invoke closure within that scope.

Parameters:
categoryClasses - the list of classes containing category methods
closure - the closure during which to make the category class methods available

hasCategoryInAnyThread

public static boolean hasCategoryInAnyThread()


Copyright © 2003-2011 The Codehaus. All Rights Reserved.