Groovy Documentation

org.ajoberstar.gradle.util
[Java] Class ObjectUtil

java.lang.Object
  org.ajoberstar.gradle.util.ObjectUtil

public class ObjectUtil

Utility class for general Object related operations.

Since:
0.1.0


Method Summary
static java.lang.Object unpack(java.lang.Object obj)

Unpacks the given object by recursively calling the call() method if the object is a Closure or Callable.

static java.lang.String unpackString(java.lang.Object obj)

Unpacks the given object to its String value.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

unpack

ssWarnings("rawtypes")
	public
public static java.lang.Object unpack(java.lang.Object obj)
Unpacks the given object by recursively calling the call() method if the object is a Closure or Callable.
Parameters:
obj - the object to unpack
Returns:
the unpacked value of the object


unpackString

public static java.lang.String unpackString(java.lang.Object obj)
Unpacks the given object to its String value. Same behavior as the other unpack method ending with a call to toString().
Parameters:
obj - the value to unpack
Returns:
the unpacked string value
See Also:
ObjectUtil#unpack(Object)#unpack(Object)


 

Groovy Documentation