|
Groovy JDK | |||||||||
| Method Summary | |
|---|---|
MetaClass
|
getMetaClass()
Adds a "metaClass" property to all class objects so you can use the syntax String
|
boolean
|
isCase(Object switchValue)
Special 'Case' implementation for Class, which allows testing for a certain class in a switch statement For example: switch( obj ) {
case List :
// obj is a list
break;
case Set :
// etc
} |
Object
|
newInstance()
Convenience method to dynamically create a new instance of this class |
Object
|
newInstance(Object[] args)
Helper to construct a new instance from the given arguments The constructor is called based on the number and types in the args array newInstance() for the default (no-arg) constructor
|
| Method Detail |
|---|
public MetaClass getMetaClass()
String.metaClass.myMethod = { println "foo" }
public boolean isCase(Object switchValue)
switch( obj ) {
case List :
// obj is a list
break;
case Set :
// etc
}
switchValue - the switch value.
public Object newInstance()
public Object newInstance(Object[] args)
newInstance(null) or simply
newInstance() for the default (no-arg) constructor.
args - the constructor arguments.
|
Groovy JDK | |||||||||