Top Description Inners Fields Constructors Methods
org.springframework.beans.factory.groovy

public Class GroovyBeanDefinitionReader

extends AbstractBeanDefinitionReader
implements GroovyObject
Class Inheritance
All Implemented Interfaces
groovy.lang.GroovyObject
Imports
java.io.IOException, java.util.Arrays, .Collection, .HashMap, .List, .Map, groovy.lang.Binding, .Closure, .GString, .GroovyObject, .GroovyObjectSupport, .GroovyShell, .GroovySystem, .MetaClass, org.codehaus.groovy.runtime.DefaultGroovyMethods, .InvokerHelper, org.springframework.beans.MutablePropertyValues, org.springframework.beans.factory.BeanDefinitionStoreException, org.springframework.beans.factory.config.RuntimeBeanReference, org.springframework.beans.factory.parsing.BeanDefinitionParsingException, .Location, .Problem, org.springframework.beans.factory.support.AbstractBeanDefinition, .AbstractBeanDefinitionReader, .BeanDefinitionRegistry, .GenericBeanDefinition, .ManagedList, .ManagedMap, org.springframework.beans.factory.xml.BeanDefinitionParserDelegate, .NamespaceHandler, .XmlBeanDefinitionReader, .XmlReaderContext, org.springframework.core.io.DescriptiveResource, .Resource, org.springframework.core.io.support.EncodedResource, org.springframework.lang.Nullable, org.springframework.util.ObjectUtils, .StringUtils

A Groovy-based reader for Spring bean definitions: like a Groovy builder, but more of a DSL for Spring configuration.

This bean definition reader also understands XML bean definition files, allowing for seamless mixing and matching with Groovy bean definition files.

Typically applied to a org.springframework.beans.factory.support.DefaultListableBeanFactory or a org.springframework.context.support.GenericApplicationContext, but can be used against any BeanDefinitionRegistry implementation.

Example Syntax

import org.hibernate.SessionFactory
import org.apache.commons.dbcp.BasicDataSource

def reader = new GroovyBeanDefinitionReader(myApplicationContext)
reader.beans {
    dataSource(BasicDataSource) {                  // <--- invokeMethod
        driverClassName = "org.hsqldb.jdbcDriver"
        url = "jdbc:hsqldb:mem:grailsDB"
        username = "sa"                            // <-- setProperty
        password = ""
        settings = [mynew:"setting"]
    }
    sessionFactory(SessionFactory) {
        dataSource = dataSource                    // <-- getProperty for retrieving references
    }
    myService(MyService) {
        nestedBean = { AnotherBean bean ->         // <-- setProperty with closure for nested bean
            dataSource = dataSource
        }
    }
}

You can also load resources containing beans defined in a Groovy script using either the loadBeanDefinitions(Resource...) or loadBeanDefinitions(String...) method, with a script looking similar to the following.

import org.hibernate.SessionFactory
import org.apache.commons.dbcp.BasicDataSource

beans {
    dataSource(BasicDataSource) {
        driverClassName = "org.hsqldb.jdbcDriver"
        url = "jdbc:hsqldb:mem:grailsDB"
        username = "sa"
        password = ""
        settings = [mynew:"setting"]
    }
    sessionFactory(SessionFactory) {
        dataSource = dataSource
    }
    myService(MyService) {
        nestedBean = { AnotherBean bean ->
            dataSource = dataSource
        }
    }
}
Authors
Jeff Brown, Graeme Rocher, Juergen Hoeller, Sam Brannen
Since
4.0
See Also
BeanDefinitionRegistry, org.springframework.beans.factory.support.DefaultListableBeanFactory, org.springframework.context.support.GenericApplicationContext, org.springframework.context.support.GenericGroovyApplicationContext

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
GroovyBeanDefinitionReader.DeferredProperty

This class is used to defer the adding of a property to a bean definition until later.

private class
GroovyBeanDefinitionReader.GroovyRuntimeBeanReference

A RuntimeBeanReference that takes care of adding new properties to runtime references.

Field Summary

Modifier and TypeField and Description
private Binding
private GroovyBeanDefinitionWrapper
private final Map<String, GroovyBeanDefinitionReader.DeferredProperty>
private final XmlBeanDefinitionReader
groovyDslXmlBeanDefinitionReader

Groovy DSL XmlBeanDefinitionReader for loading bean definitions via the Groovy DSL, typically configured with XML validation disabled.

private MetaClass
private final Map<String, String>
private final XmlBeanDefinitionReader
standardXmlBeanDefinitionReader

Standard XmlBeanDefinitionReader created with default settings for loading bean definitions from XML files.

Inherited from org.springframework.beans.factory.support.AbstractBeanDefinitionReader:
logger

Constructor Summary

AccessConstructor and Description
public
GroovyBeanDefinitionReader(BeanDefinitionRegistry
the BeanDefinitionRegistry to load bean definitions into
registry
)

Create a new GroovyBeanDefinitionReader for the given BeanDefinitionRegistry.

public
GroovyBeanDefinitionReader(XmlBeanDefinitionReader
the XmlBeanDefinitionReader to derive the registry from and to delegate Groovy DSL loading to
xmlBeanDefinitionReader
)

Create a new GroovyBeanDefinitionReader based on the given XmlBeanDefinitionReader, loading bean definitions into its BeanDefinitionRegistry and delegating Groovy DSL loading to it.

Method Summary

Modifier and TypeMethod and Description
private boolean
addDeferredProperty(String property, Object newValue)

protected void
public GenericBeanDefinition

Returns:

the bean definition
bean
(Class<?>
the bean type
type
)

Define an inner bean definition.

public AbstractBeanDefinition

Returns:

the bean definition
bean
(Class<?>
the bean type
type
,
Object...
the constructors arguments and closure configurer
args
)

Define an inner bean definition.

public GroovyBeanDefinitionReader

Returns:

this GroovyBeanDefinitionReader instance
beans
(Closure<?>
the block or closure
closure
)

Defines a set of beans for the given block or closure.

private GroovyDynamicElementReader
private void
public Binding
getBinding()

Return a specified binding for Groovy variables, if any.

public MetaClass
getMetaClass()

Implements groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.

public Object
getProperty(String
the name of the property of interest
name
)

Overrides default groovy.lang.GroovyObject.getProperty.

This method overrides property retrieval in the scope of the GroovyBeanDefinitionReader.

public void
importBeans(String
the resource pattern
resourcePattern
)

Import Spring bean definitions from either XML or Groovy sources into the current bean builder instance.

protected GroovyBeanDefinitionReader

Returns:

this GroovyBeanDefinitionReader instance
invokeBeanDefiningClosure
(Closure<?>
the closure argument
callable
)

When a method argument is only a closure it is a set of bean definitions.

private GroovyBeanDefinitionWrapper

Returns:

the bean definition wrapper
invokeBeanDefiningMethod
(String
the name of the bean to define
beanName
,
Object[]
the arguments to the bean. The first argument is the class name, the last argument is sometimes a closure. All the arguments in between are constructor arguments.
args
)

This method is called when a bean definition node is called.

public Object
invokeMethod(String
the name of the method to call
name
,
Object
the arguments to use for the method call
arg
)

Overrides default groovy.lang.GroovyObject.invokeMethod.

This method overrides method invocation to create beans for each method name that takes a class argument.

public int

Returns:

the number of bean definitions found
loadBeanDefinitions
(Resource
the resource descriptor for the Groovy script or XML file
resource
)

Implements org.springframework.beans.factory.support.BeanDefinitionReader.loadBeanDefinitions.

Load bean definitions from the specified Groovy script or XML file.

public int

Returns:

the number of bean definitions found
loadBeanDefinitions
(EncodedResource
the resource descriptor for the Groovy script or XML file, allowing specification of an encoding to use for parsing the file
encodedResource
)

Load bean definitions from the specified Groovy script or XML file.

private Object

Returns:

either the original list or a managed copy of it
manageListIfNecessary
(List<?>
the original List
list
)

Checks whether there are any RuntimeBeanReferences inside the List and converts it to a ManagedList if necessary.

private Object

Returns:

either the original map or a managed copy of it
manageMapIfNecessary
(Map<?, ?>
the original Map
map
)

Checks whether there are any RuntimeBeanReferences inside the Map and converts it to a ManagedMap if necessary.

protected List<Object>
resolveConstructorArguments(Object[] args, int start, int end)

public void
setBinding(Binding binding)

Set the binding, i.e. the Groovy variables available in the scope of a GroovyBeanDefinitionReader closure.

public void
setMetaClass(MetaClass
the new metaclass
metaClass
)

Implements groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

public void
setProperty(String
the name of the property of interest
name
,
Object
the new value for the property
value
)

Overrides default groovy.lang.GroovyObject.setProperty.

This method overrides property setting in the scope of the GroovyBeanDefinitionReader to set properties on the current bean definition.

public void
xmlns(Map<String, String>
the namespace definition
definition
)

Define a Spring XML namespace definition to use.

Inherited from org.springframework.beans.factory.support.AbstractBeanDefinitionReader:
getBeanClassLoadergetBeanNameGeneratorgetEnvironmentgetRegistrygetResourceLoaderloadBeanDefinitionsloadBeanDefinitionsloadBeanDefinitionsloadBeanDefinitionssetBeanClassLoadersetBeanNameGeneratorsetEnvironmentsetResourceLoader

Field Detail

bindingback to summary
private Binding binding
Annotations
@Nullable
currentBeanDefinitionback to summary
private GroovyBeanDefinitionWrapper currentBeanDefinition
Annotations
@Nullable
deferredPropertiesback to summary
private final Map<String, GroovyBeanDefinitionReader.DeferredProperty> deferredProperties
groovyDslXmlBeanDefinitionReaderback to summary
private final XmlBeanDefinitionReader groovyDslXmlBeanDefinitionReader

Groovy DSL XmlBeanDefinitionReader for loading bean definitions via the Groovy DSL, typically configured with XML validation disabled.

metaClassback to summary
private MetaClass metaClass
namespacesback to summary
private final Map<String, String> namespaces
standardXmlBeanDefinitionReaderback to summary
private final XmlBeanDefinitionReader standardXmlBeanDefinitionReader

Standard XmlBeanDefinitionReader created with default settings for loading bean definitions from XML files.

Constructor Detail

GroovyBeanDefinitionReaderback to summary
public GroovyBeanDefinitionReader(BeanDefinitionRegistry registry)

Create a new GroovyBeanDefinitionReader for the given BeanDefinitionRegistry.

Parameters
registry:BeanDefinitionRegistry

the BeanDefinitionRegistry to load bean definitions into

GroovyBeanDefinitionReaderback to summary
public GroovyBeanDefinitionReader(XmlBeanDefinitionReader xmlBeanDefinitionReader)

Create a new GroovyBeanDefinitionReader based on the given XmlBeanDefinitionReader, loading bean definitions into its BeanDefinitionRegistry and delegating Groovy DSL loading to it.

The supplied XmlBeanDefinitionReader should typically be pre-configured with XML validation disabled.

Parameters
xmlBeanDefinitionReader:XmlBeanDefinitionReader

the XmlBeanDefinitionReader to derive the registry from and to delegate Groovy DSL loading to

Method Detail

addDeferredPropertyback to summary
private boolean addDeferredProperty(String property, Object newValue)
applyPropertyToBeanDefinitionback to summary
protected void applyPropertyToBeanDefinition(String name, Object value)
beanback to summary
public GenericBeanDefinition bean(Class<?> type)

Define an inner bean definition.

Parameters
type:Class<?>

the bean type

Returns:GenericBeanDefinition

the bean definition

beanback to summary
public AbstractBeanDefinition bean(Class<?> type, Object... args)

Define an inner bean definition.

Parameters
type:Class<?>

the bean type

args:Object[]

the constructors arguments and closure configurer

Returns:AbstractBeanDefinition

the bean definition

beansback to summary
public GroovyBeanDefinitionReader beans(Closure<?> closure)

Defines a set of beans for the given block or closure.

Parameters
closure:Closure<?>

the block or closure

Returns:GroovyBeanDefinitionReader

this GroovyBeanDefinitionReader instance

createDynamicElementReaderback to summary
private GroovyDynamicElementReader createDynamicElementReader(String namespace)
finalizeDeferredPropertiesback to summary
private void finalizeDeferredProperties()
getBindingback to summary
public Binding getBinding()

Return a specified binding for Groovy variables, if any.

Annotations
@Nullable
getMetaClassback to summary
public MetaClass getMetaClass()

Implements groovy.lang.GroovyObject.getMetaClass.

Doc from groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.

Returns:MetaClass

the metaClass of this instance

Annotations
@Override
getPropertyback to summary
public Object getProperty(String name)

Overrides default groovy.lang.GroovyObject.getProperty.

This method overrides property retrieval in the scope of the GroovyBeanDefinitionReader. A property retrieval will either:

  • Retrieve a variable from the bean builder's binding if it exists
  • Retrieve a RuntimeBeanReference for a specific bean if it exists
  • Otherwise just delegate to MetaClass.getProperty which will resolve properties from the GroovyBeanDefinitionReader itself
Parameters
name:String

Doc from groovy.lang.GroovyObject.getProperty.

the name of the property of interest

Returns:Object

Doc from groovy.lang.GroovyObject.getProperty.

the given property

Annotations
@Override
importBeansback to summary
public void importBeans(String resourcePattern) throws IOException

Import Spring bean definitions from either XML or Groovy sources into the current bean builder instance.

Parameters
resourcePattern:String

the resource pattern

invokeBeanDefiningClosureback to summary
protected GroovyBeanDefinitionReader invokeBeanDefiningClosure(Closure<?> callable)

When a method argument is only a closure it is a set of bean definitions.

Parameters
callable:Closure<?>

the closure argument

Returns:GroovyBeanDefinitionReader

this GroovyBeanDefinitionReader instance

invokeBeanDefiningMethodback to summary
private GroovyBeanDefinitionWrapper invokeBeanDefiningMethod(String beanName, Object[] args)

This method is called when a bean definition node is called.

Parameters
beanName:String

the name of the bean to define

args:Object[]

the arguments to the bean. The first argument is the class name, the last argument is sometimes a closure. All the arguments in between are constructor arguments.

Returns:GroovyBeanDefinitionWrapper

the bean definition wrapper

invokeMethodback to summary
public Object invokeMethod(String name, Object arg)

Overrides default groovy.lang.GroovyObject.invokeMethod.

This method overrides method invocation to create beans for each method name that takes a class argument.

Parameters
name:String

Doc from groovy.lang.GroovyObject.invokeMethod.

the name of the method to call

arg:Object

Doc from groovy.lang.GroovyObject.invokeMethod.

the arguments to use for the method call

Returns:Object

Doc from groovy.lang.GroovyObject.invokeMethod.

the result of invoking the method

Annotations
@Override
loadBeanDefinitionsback to summary
public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException

Implements org.springframework.beans.factory.support.BeanDefinitionReader.loadBeanDefinitions.

Load bean definitions from the specified Groovy script or XML file.

Note that ".xml" files will be parsed as XML content; all other kinds of resources will be parsed as Groovy scripts.

Parameters
resource:Resource

the resource descriptor for the Groovy script or XML file

Returns:int

the number of bean definitions found

Annotations
@Override
Exceptions
BeanDefinitionStoreException:
in case of loading or parsing errors
loadBeanDefinitionsback to summary
public int loadBeanDefinitions(EncodedResource encodedResource) throws BeanDefinitionStoreException

Load bean definitions from the specified Groovy script or XML file.

Note that ".xml" files will be parsed as XML content; all other kinds of resources will be parsed as Groovy scripts.

Parameters
encodedResource:EncodedResource

the resource descriptor for the Groovy script or XML file, allowing specification of an encoding to use for parsing the file

Returns:int

the number of bean definitions found

Exceptions
BeanDefinitionStoreException:
in case of loading or parsing errors
manageListIfNecessaryback to summary
private Object manageListIfNecessary(List<?> list)

Checks whether there are any RuntimeBeanReferences inside the List and converts it to a ManagedList if necessary.

Parameters
list:List<?>

the original List

Returns:Object

either the original list or a managed copy of it

manageMapIfNecessaryback to summary
private Object manageMapIfNecessary(Map<?, ?> map)

Checks whether there are any RuntimeBeanReferences inside the Map and converts it to a ManagedMap if necessary.

Parameters
map:Map<?, ?>

the original Map

Returns:Object

either the original map or a managed copy of it

resolveConstructorArgumentsback to summary
protected List<Object> resolveConstructorArguments(Object[] args, int start, int end)
setBindingback to summary
public void setBinding(Binding binding)

Set the binding, i.e. the Groovy variables available in the scope of a GroovyBeanDefinitionReader closure.

setMetaClassback to summary
public void setMetaClass(MetaClass metaClass)

Implements groovy.lang.GroovyObject.setMetaClass.

Doc from groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

Parameters
metaClass:MetaClass

the new metaclass

Annotations
@Override
setPropertyback to summary
public void setProperty(String name, Object value)

Overrides default groovy.lang.GroovyObject.setProperty.

This method overrides property setting in the scope of the GroovyBeanDefinitionReader to set properties on the current bean definition.

Parameters
name:String

Doc from groovy.lang.GroovyObject.setProperty.

the name of the property of interest

value:Object

Doc from groovy.lang.GroovyObject.setProperty.

the new value for the property

Annotations
@Override
xmlnsback to summary
public void xmlns(Map<String, String> definition)

Define a Spring XML namespace definition to use.

Parameters
definition:Map<String, String>

the namespace definition

org.springframework.beans.factory.groovy back to summary

private Class GroovyBeanDefinitionReader.DeferredProperty

extends Object
Class Inheritance
  • java.lang.Object
  • org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader.DeferredProperty

This class is used to defer the adding of a property to a bean definition until later. This is for a case where you assign a property to a list that may not contain bean references at that point of assignment, but may later; hence, it would need to be managed.

Field Summary

Modifier and TypeField and Description
private final GroovyBeanDefinitionWrapper
private final String
public Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanDefinitionback to summary
private final GroovyBeanDefinitionWrapper beanDefinition
nameback to summary
private final String name
valueback to summary
public Object value

Constructor Detail

DeferredPropertyback to summary
public DeferredProperty(GroovyBeanDefinitionWrapper beanDefinition, String name, Object value)

Method Detail

applyback to summary
public void apply()
org.springframework.beans.factory.groovy back to summary

private Class GroovyBeanDefinitionReader.GroovyRuntimeBeanReference

extends RuntimeBeanReference
implements GroovyObject
Class Inheritance
All Implemented Interfaces
groovy.lang.GroovyObject

A RuntimeBeanReference that takes care of adding new properties to runtime references.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
GroovyBeanDefinitionReader.GroovyRuntimeBeanReference.GroovyPropertyValue

Wraps a bean definition property and ensures that any RuntimeBeanReference additions to it are deferred for resolution later.

Field Summary

Modifier and TypeField and Description
private final GroovyBeanDefinitionWrapper
private MetaClass

Constructor Summary

AccessConstructor and Description
public
GroovyRuntimeBeanReference(String beanName, GroovyBeanDefinitionWrapper beanDefinition, boolean toParent)

Method Summary

Modifier and TypeMethod and Description
public MetaClass
getMetaClass()

Implements groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.

public Object
getProperty(String
the name of the property of interest
property
)

Overrides default groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

public Object
invokeMethod(String
the name of the method to call
name
,
Object
the arguments to use for the method call
args
)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

public void
setMetaClass(MetaClass
the new metaclass
metaClass
)

Implements groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

public void
setProperty(String
the name of the property of interest
property
,
Object
the new value for the property
newValue
)

Overrides default groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

Inherited from org.springframework.beans.factory.config.RuntimeBeanReference:
equalsgetBeanNamegetBeanTypegetSourcehashCodeisToParentsetSourcetoString

Field Detail

beanDefinitionback to summary
private final GroovyBeanDefinitionWrapper beanDefinition
metaClassback to summary
private MetaClass metaClass

Constructor Detail

GroovyRuntimeBeanReferenceback to summary
public GroovyRuntimeBeanReference(String beanName, GroovyBeanDefinitionWrapper beanDefinition, boolean toParent)

Method Detail

getMetaClassback to summary
public MetaClass getMetaClass()

Implements groovy.lang.GroovyObject.getMetaClass.

Doc from groovy.lang.GroovyObject.getMetaClass.

Returns the metaclass for a given class.

Returns:MetaClass

the metaClass of this instance

Annotations
@Override
getPropertyback to summary
public Object getProperty(String property)

Overrides default groovy.lang.GroovyObject.getProperty.

Doc from groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

Parameters
property:String

the name of the property of interest

Returns:Object

the given property

Annotations
@Override
invokeMethodback to summary
public Object invokeMethod(String name, Object args)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Doc from groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

Parameters
name:String

the name of the method to call

args:Object

the arguments to use for the method call

Returns:Object

the result of invoking the method

Annotations
@Override
setMetaClassback to summary
public void setMetaClass(MetaClass metaClass)

Implements groovy.lang.GroovyObject.setMetaClass.

Doc from groovy.lang.GroovyObject.setMetaClass.

Allows the MetaClass to be replaced with a derived implementation.

Parameters
metaClass:MetaClass

the new metaclass

Annotations
@Override
setPropertyback to summary
public void setProperty(String property, Object newValue)

Overrides default groovy.lang.GroovyObject.setProperty.

Doc from groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

Parameters
property:String

the name of the property of interest

newValue:Object

the new value for the property

Annotations
@Override
org.springframework.beans.factory.groovy back to summary

private Class GroovyBeanDefinitionReader.GroovyRuntimeBeanReference.GroovyPropertyValue

extends GroovyObjectSupport
Class Inheritance

Wraps a bean definition property and ensures that any RuntimeBeanReference additions to it are deferred for resolution later.

Field Summary

Modifier and TypeField and Description
private final String
private final Object

Constructor Summary

AccessConstructor and Description
public
GroovyPropertyValue(String propertyName, Object propertyValue)

Method Summary

Modifier and TypeMethod and Description
public boolean
add(Object value)

public boolean
addAll(Collection<?> values)

public Object
getProperty(String
the name of the property of interest
name
)

Overrides default groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

public Object
invokeMethod(String
the name of the method to call
name
,
Object
the arguments to use for the method call
args
)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

public void
public void
setProperty(String
the name of the property of interest
name
,
Object
the new value for the property
value
)

Overrides default groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

private void
Inherited from groovy.lang.GroovyObjectSupport:
getMetaClasssetMetaClass

Field Detail

propertyNameback to summary
private final String propertyName
propertyValueback to summary
private final Object propertyValue

Constructor Detail

GroovyPropertyValueback to summary
public GroovyPropertyValue(String propertyName, Object propertyValue)

Method Detail

addback to summary
public boolean add(Object value)
Annotations
@SuppressWarnings:unused
addAllback to summary
public boolean addAll(Collection<?> values)
Annotations
@SuppressWarnings:unused
getPropertyback to summary
public Object getProperty(String name)

Overrides default groovy.lang.GroovyObject.getProperty.

Doc from groovy.lang.GroovyObject.getProperty.

Retrieves a property value.

Parameters
name:String

the name of the property of interest

Returns:Object

the given property

Annotations
@Override
invokeMethodback to summary
public Object invokeMethod(String name, Object args)

Overrides default groovy.lang.GroovyObject.invokeMethod.

Doc from groovy.lang.GroovyObject.invokeMethod.

Invokes the given method.

Parameters
name:String

the name of the method to call

args:Object

the arguments to use for the method call

Returns:Object

the result of invoking the method

Annotations
@Override
leftShiftback to summary
public void leftShift(Object value)
Annotations
@SuppressWarnings:unused
setPropertyback to summary
public void setProperty(String name, Object value)

Overrides default groovy.lang.GroovyObject.setProperty.

Doc from groovy.lang.GroovyObject.setProperty.

Sets the given property to the new value.

Parameters
name:String

the name of the property of interest

value:Object

the new value for the property

Annotations
@Override
updateDeferredPropertiesback to summary
private void updateDeferredProperties(Object value)