groovy.lang
Interface GroovyObject

All Known Subinterfaces:
GroovyInterceptable, GroovyResultSet
All Known Implementing Classes:
ANSI.RenderMessageSource, AntBuilder, Attribute, BaseMarkupBuilder, Binding, BooleanWrapper, Builder, Builder.Built, BuilderSupport, ByteWrapper, CharWrapper, Closure, CurriedClosure, DelegatingMetaClass, DOMBuilder, DoubleWrapper, Expando, ExpandoMetaClass, ExpandoMetaClass.ExpandoMetaConstructor, ExpandoMetaClass.ExpandoMetaProperty, FactoryBuilderSupport, FilteredAttributes, FilteredNodeChildren, FloatWrapper, GPathResult, GroovyLog, GroovyMBean, GroovyMock, GroovyObjectSupport, GroovyObjectWrapper, GroovyResultSetExtension, GroovyRowResult, GroovyShell, GString, GStringImpl, IntWrapper, IteratorClosureAdapter, LongWrapper, MarkupBuilder, MessageSource, MethodClosure, ModelBinding, NamespaceBuilderSupport, NoChildren, NodeBuilder, NodeChild, NonEmptySequence, NullObject, ObjectGraphBuilder, PojoWrapper, Proxy, Reference, SAXBuilder, Script, ScriptReference, Sequence, ServletBinding, ShortWrapper, Wrapper

public interface GroovyObject

The interface implemented by all Groovy objects. Especially handy for using Groovy objects when in the Java world.

Version:
$Revision: 6778 $
Author:
James Strachan

Method Summary
 MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 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 property, Object newValue)
          Sets the given property to the new value
 

Method Detail

invokeMethod

Object invokeMethod(String name,
                    Object args)
Invokes the given method


getProperty

Object getProperty(String property)
Returns:
the given property

setProperty

void setProperty(String property,
                 Object newValue)
Sets the given property to the new value


getMetaClass

MetaClass getMetaClass()
Returns:
the metaClass of this instance

setMetaClass

void setMetaClass(MetaClass metaClass)
Allows the MetaClass to be replaced with a derived implementation


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