|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface GroovyObject
The interface implemented by all Groovy objects.
Especially handy for using Groovy objects when in the Java world.
Method Summary | |
---|---|
MetaClass
|
getMetaClass()
Returns the metaclass for a given class. |
Object
|
getProperty(String propertyName)
Retrieves a property value. |
Object
|
invokeMethod(String name, Object args)
Invokes the given method. |
void
|
setMetaClass(MetaClass metaClass)
Allows the MetaClass to be replaced with a derived implementation. |
void
|
setProperty(String propertyName, Object newValue)
Sets the given property to the new value. |
Method Detail |
---|
public MetaClass getMetaClass()
public Object getProperty(String propertyName)
propertyName
- the name of the property of interest
public Object invokeMethod(String name, Object args)
name
- the name of the method to callargs
- the arguments to use for the method call
public void setMetaClass(MetaClass metaClass)
metaClass
- the new metaclass
public void setProperty(String propertyName, Object newValue)
propertyName
- the name of the property of interestnewValue
- the new value for the property
Copyright © 2003-2013 The Codehaus. All rights reserved.