| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgroovy.lang.GroovyObjectSupport
org.codehaus.groovy.runtime.NullObject
public class NullObject
| Method Summary | |
|---|---|
|  Object | asType(Class c)Type conversion method for null. | 
|  Object | clone()Since this is implemented as a singleton, we should avoid the use of the clone method | 
|  boolean | equals(Object to)null is only equal to null | 
| static NullObject | getNullObject()get the NullObject reference | 
|  Object | getProperty(String property)Tries to get a property on null, which will always fail | 
|  int | hashCode() | 
|  Object | invokeMethod(String name,
             Object args)Tries to invoke a method on null, which will always fail | 
|  boolean | is(Object other)The method "is" is used to test for equal references. | 
|  Iterator | iterator()iterator() method to be able to iterate on null. | 
|  Object | plus(String s)Allows to add a String to null. | 
|  void | setProperty(String property,
            Object newValue)Tries to set a property on null, which will always fail | 
|  String | toString() | 
| Methods inherited from class groovy.lang.GroovyObjectSupport | 
|---|
| getMetaClass, setMetaClass | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Method Detail | 
|---|
public static NullObject getNullObject()
public Object clone()
clone in class Objectpublic Object getProperty(String property)
getProperty in interface GroovyObjectgetProperty in class GroovyObjectSupportproperty - - the property to get
public void setProperty(String property,
                        Object newValue)
setProperty in interface GroovyObjectsetProperty in class GroovyObjectSupportproperty - - the proprty to setnewValue - - the new value of the property
public Object invokeMethod(String name,
                           Object args)
invokeMethod in interface GroovyObjectinvokeMethod in class GroovyObjectSupportname - the name of the method to invokeargs - - arguments to the method
public boolean equals(Object to)
equals in class Objectto - - the reference object with which to compare
public Iterator iterator()
public Object plus(String s)
s - - the String to concatenate
public boolean is(Object other)
other - - the object to test
public Object asType(Class c)
c - - the class to convert to
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Object| 
 | Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||