Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.0
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
Class ProxyGenerator

    java.lang.Object
      groovy.util.ProxyGenerator

    class ProxyGenerator
    extends Object

Classes to generate 'Proxy' objects which implement interfaces, maps of closures and/or extend classes/delegates.

author:
  Paul King

author:
  Guillaume Laforge

Field Summary
`static ProxyGenerator` | `INSTANCE`

Constructor Summary
`ProxyGenerator()`

Method Summary
`boolean` | `getDebug()`
`boolean` | `getEmptyMethods()`
`ClassLoader` | `getOverride()`
`String` | `getSimpleName(Class c)` TODO once we switch to Java 1.5 bt default, use Class#getSimpleName() directly
`Object` | `instantiateAggregate(List interfaces)`
`Object` | `instantiateAggregate(Map closureMap, List interfaces)`
`Object` | `instantiateAggregate(Map closureMap, List interfaces, Class clazz)`
`Object` | `instantiateAggregate(Map closureMap, List interfaces, Class clazz, Object[] constructorArgs)`
`Object` | `instantiateAggregateFromBaseClass(Class clazz)`
`Object` | `instantiateAggregateFromBaseClass(Map map, Class clazz)`
`Object` | `instantiateAggregateFromBaseClass(Closure cl, Class clazz)`
`Object` | `instantiateAggregateFromBaseClass(Class clazz, Object[] constructorArgs)`
`Object` | `instantiateAggregateFromBaseClass(Map map, Class clazz, Object[] constructorArgs)`
`Object` | `instantiateAggregateFromInterface(Class clazz)`
`Object` | `instantiateAggregateFromInterface(Map map, Class clazz)`
`Object` | `instantiateDelegate(Object delegate)`
`Object` | `instantiateDelegate(List interfaces, Object delegate)`
`Object` | `instantiateDelegate(Map closureMap, List interfaces, Object delegate)`
`Object` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate)`
`Object` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass)`
`Object` | `instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass, String name)`
`void` | `setDebug(boolean debug)` Instructs `ProxyGenerator` to dump generated Groovy source code to standard output during construction.
`void` | `setEmptyMethods(boolean emptyMethods)` Changes generated methods to have empty implementations.
`void` | `setOverride(ClassLoader override)`
`String` | `shortName(String name)`

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### INSTANCE

    static final ProxyGenerator INSTANCE

Constructor Detail

### ProxyGenerator

    ProxyGenerator()

Method Detail

### getDebug

    public boolean getDebug()

### getEmptyMethods

    public boolean getEmptyMethods()

### getOverride

    public ClassLoader getOverride()

### getSimpleName

    public String getSimpleName(Class c)

  TODO once we switch to Java 1.5 bt default, use Class#getSimpleName() directly
  param:
    c the class of which we want the readable simple name
  return:
    the readable simple name

### instantiateAggregate

    public Object instantiateAggregate(List interfaces)

### instantiateAggregate

    public Object instantiateAggregate(Map closureMap, List interfaces)

### instantiateAggregate

    public Object instantiateAggregate(Map closureMap, List interfaces, Class clazz)

### instantiateAggregate

    public Object instantiateAggregate(Map closureMap, List interfaces, Class clazz, Object[] constructorArgs)

### instantiateAggregateFromBaseClass

    public Object instantiateAggregateFromBaseClass(Class clazz)

### instantiateAggregateFromBaseClass

    public Object instantiateAggregateFromBaseClass(Map map, Class clazz)

### instantiateAggregateFromBaseClass

    public Object instantiateAggregateFromBaseClass(Closure cl, Class clazz)

### instantiateAggregateFromBaseClass

    public Object instantiateAggregateFromBaseClass(Class clazz, Object[] constructorArgs)

### instantiateAggregateFromBaseClass

    public Object instantiateAggregateFromBaseClass(Map map, Class clazz, Object[] constructorArgs)

### instantiateAggregateFromInterface

    public Object instantiateAggregateFromInterface(Class clazz)

### instantiateAggregateFromInterface

    public Object instantiateAggregateFromInterface(Map map, Class clazz)

### instantiateDelegate

    public Object instantiateDelegate(Object delegate)

### instantiateDelegate

    public Object instantiateDelegate(List interfaces, Object delegate)

### instantiateDelegate

    public Object instantiateDelegate(Map closureMap, List interfaces, Object delegate)

### instantiateDelegateWithBaseClass

    public Object instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate)

### instantiateDelegateWithBaseClass

    public Object instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass)

### instantiateDelegateWithBaseClass

    public Object instantiateDelegateWithBaseClass(Map closureMap, List interfaces, Object delegate, Class baseClass, String name)

### setDebug

    public void setDebug(boolean debug)

  Instructs `ProxyGenerator` to dump generated Groovy source code to standard output during construction. This is useful for debugging purposes but should be turned off in production.
  param:
    debug true if you want generated source to be printed

### setEmptyMethods

    public void setEmptyMethods(boolean emptyMethods)

  Changes generated methods to have empty implementations. Methods in generated aggregates not supplied in a closures map or base class are given 'default' implementations. The implementation will normally throw an `UnsupportedOperationException` but setting this boolean will leave it empty.
  param:
    emptyMethods true if you want generated methods to be empty

### setOverride

    public void setOverride(ClassLoader override)

### shortName

    public String shortName(String name)

Copyright © 2003-2009 The Codehaus. All rights reserved.