Package org.jclouds.rest.internal
Class DelegatesToInvocationFunction<S,F extends com.google.common.base.Function<Invocation,Object>>
java.lang.Object
org.jclouds.rest.internal.DelegatesToInvocationFunction<S,F>
- Type Parameters:
S
- The enclosing type of the interface that a dynamic proxy like this implementsF
- The function that implements this dynamic proxy
- All Implemented Interfaces:
InvocationHandler
@Beta
public class DelegatesToInvocationFunction<S,F extends com.google.common.base.Function<Invocation,Object>>
extends Object
implements InvocationHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.google.inject.Injector
protected final F
protected final com.google.common.base.Function
<InvocationSuccess, com.google.common.base.Optional<Object>> protected final com.google.common.reflect.TypeToken
<S> protected final SetCaller
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
handle
(Invocation invocation) final Object
protected com.google.inject.Key
<?> methodInvokerFor
(Class<?> returnType) attempts to guess the generic type params for the delegate's invocation function based on the supplied typetoString()
-
Field Details
-
injector
protected final com.google.inject.Injector injector -
ownerType
-
setCaller
-
optionalConverter
protected final com.google.common.base.Function<InvocationSuccess,com.google.common.base.Optional<Object>> optionalConverter -
methodInvoker
-
-
Method Details
-
invoke
proxy.hashCode()
delegates toinvalid reference
AbstractInvocationHandler#hashCode
proxy.toString()
delegates toinvalid reference
AbstractInvocationHandler#toString
proxy.equals(argument)
returns true if:proxy
andargument
are of the same type- and
invalid reference
AbstractInvocationHandler#equals
InvocationHandler
ofargument
- other method calls are dispatched to
invalid reference
#handleInvocation
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-
handle
-
methodInvokerFor
attempts to guess the generic type params for the delegate's invocation function based on the supplied type -
toString
-