F
- Type of function being wrapped.public abstract class WrappedFunction<F>
extends java.lang.Object
implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
WrappedFunction(F f) |
Modifier and Type | Method and Description |
---|---|
F |
f()
Function that was wrapped.
|
<C> C |
unwrap(java.lang.Class<C> clazz)
Unwrap to find the outermost function that is an instance of
clazz . |
static <C> C |
unwrap(java.lang.Class<C> clazz,
java.lang.Object wf)
Unwrap a function object to find the outermost function that implements
clazz . |
protected WrappedFunction(F f)
public final F f()
public <C> C unwrap(java.lang.Class<C> clazz)
clazz
.C
- Type of class.clazz
- Implementation class to search for.clazz
,
null
if clazz
is not implemented by this
or any function it wraps.unwrap(Class, Object)
public static <C> C unwrap(java.lang.Class<C> clazz, java.lang.Object wf)
clazz
.
If a function object is not an instance of clazz
but is an instance of
WrappedFunction
then the test is repeated on the value of f()
.C
- Type of class.clazz
- Implementation class to search for.wf
- Function to unwrapclazz
, null
if
if clazz
is not implemented by wf
or any function it wraps.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641