@Deprecated
public class GroovyJavaMethods
extends java.lang.Object
Constructor and Description |
---|
GroovyJavaMethods()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.Callable<T> |
callableFromClosure(groovy.lang.Closure<T> job)
Deprecated.
|
static <T> java.util.concurrent.Callable<T> |
callableFromRunnable(java.lang.Runnable job)
Deprecated.
|
static <T> groovy.lang.Closure<T> |
castToClosure(java.lang.Object o)
Deprecated.
|
static <T> <any> |
castToPredicate(java.lang.Object o)
Deprecated.
|
static <T> groovy.lang.Closure<T> |
closureFromCallable(java.util.concurrent.Callable<T> job)
Deprecated.
|
static <T> groovy.lang.Closure<T> |
closureFromFunction(<any> job)
Deprecated.
|
static <T> groovy.lang.Closure<T> |
closureFromRunnable(java.lang.Runnable job)
Deprecated.
|
static <T> T |
elvis(java.lang.Object... preferences)
Deprecated.
|
static <T> T |
elvis(java.lang.Object preferred,
java.lang.Object fallback)
Deprecated.
|
static <T> T |
fix(java.lang.Object o)
Deprecated.
|
static <F,T> <any> |
functionFromClosure(groovy.lang.Closure<T> job)
Deprecated.
|
static <T> T |
invokeMethodOnMetaClass(java.lang.Object target,
java.lang.String methodName,
java.lang.Object args)
Deprecated.
|
static <T> <any> |
predicateFromClosure(groovy.lang.Closure<java.lang.Boolean> job)
Deprecated.
|
static boolean |
safeGroovyIsCase(java.lang.Object switchValue,
java.lang.Class caseExpression)
Deprecated.
Alternative implementation of
ScriptBytecodeAdapter.isCase(Object, Object) Stripped down to work only for caseExpression of type java.lang.Class .It behaves the same way only for cases when caseExpression java.lang.Class does not implement isCase method.It goes directly to DefaultGroovyMethods.isCase(Object, Object) method instead of using Groovy dynamic invocation.This saves extra operations and avoids the locks used in Groovy dynamic invocation. |
static boolean |
truth(java.lang.Object o)
Deprecated.
|
static <any> |
truthPredicate()
Deprecated.
|
public static <T> groovy.lang.Closure<T> closureFromRunnable(java.lang.Runnable job)
public static <T> groovy.lang.Closure<T> closureFromCallable(java.util.concurrent.Callable<T> job)
public static <T> groovy.lang.Closure<T> closureFromFunction(<any> job)
public static <T> java.util.concurrent.Callable<T> callableFromClosure(groovy.lang.Closure<T> job)
public static <T> java.util.concurrent.Callable<T> callableFromRunnable(java.lang.Runnable job)
public static boolean safeGroovyIsCase(java.lang.Object switchValue, java.lang.Class caseExpression)
ScriptBytecodeAdapter.isCase(Object, Object)
java.lang.Class
.java.lang.Class
does not implement isCase
method.DefaultGroovyMethods.isCase(Object, Object)
method instead of using Groovy dynamic invocation.public static <T> <any> predicateFromClosure(groovy.lang.Closure<java.lang.Boolean> job)
public static <F,T> <any> functionFromClosure(groovy.lang.Closure<T> job)
public static <T> <any> castToPredicate(java.lang.Object o)
public static <T> groovy.lang.Closure<T> castToClosure(java.lang.Object o)
public static <any> truthPredicate()
public static boolean truth(java.lang.Object o)
public static <T> T elvis(java.lang.Object preferred, java.lang.Object fallback)
public static <T> T elvis(java.lang.Object... preferences)
public static <T> T fix(java.lang.Object o)
public static <T> T invokeMethodOnMetaClass(java.lang.Object target, java.lang.String methodName, java.lang.Object args)