GroovyInterceptable, GroovyResultSetAntBuilder, Attribute, Attributes, BaseMarkupBuilder, BatchingPreparedStatementWrapper, BatchingStatementWrapper, Binding, BindingProxy, BooleanWrapper, Builder, Builder.Built, BuilderSupport, ByteWrapper, CharWrapper, Closure, ComposedClosure, ConfigObject, CurriedClosure, DelegatingMetaClass, DelegatingScript, DOMBuilder, DoubleWrapper, Expando, ExpandoMetaClass, ExpandoMetaClass.ExpandoMetaConstructor, ExpandoMetaClass.ExpandoMetaProperty, FactoryBuilderSupport, FilteredAttributes, FilteredNodeChildren, FloatWrapper, GPathResult, GroovyMBean, GroovyObjectSupport, GroovyObjectWrapper, GroovyResultSetExtension, GroovyRowResult, GroovyShell, GroovyTypeCheckingExtensionSupport.TypeCheckingDSL, GString, GStringImpl, HandleMetaClass, IntWrapper, IteratorClosureAdapter, JsonBuilder, JsonDelegate, LongWrapper, MarkupBuilder, MessageSource, MethodClosure, MixedInMetaClass, NamespaceBuilderSupport, NoChildren, NodeBuilder, NodeChild, NodeChildren, NodeParents, NonEmptySequence, NullObject, ObjectGraphBuilder, OwnedMetaClass, PojoWrapper, Proxy, Reference, ResultSetMetaDataWrapper, SAXBuilder, Script, ScriptReference, Sequence, ServletBinding, ShortWrapper, StreamingJsonBuilder, StreamingJsonBuilder.StreamingJsonDelegate, Wrapperpublic interface GroovyObject
Especially handy for using Groovy objects when in the Java world.
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
Object invokeMethod(String name, Object args)
name - the name of the method to callargs - the arguments to use for the method callObject getProperty(String propertyName)
propertyName - the name of the property of interestvoid setProperty(String propertyName, Object newValue)
propertyName - the name of the property of interestnewValue - the new value for the propertyMetaClass getMetaClass()
void setMetaClass(MetaClass metaClass)
metaClass - the new metaclass