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.Injectorprotected final Fprotected 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 Objecthandle(Invocation invocation) final Objectprotected 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#hashCodeproxy.toString()delegates toinvalid reference
AbstractInvocationHandler#toStringproxy.equals(argument)returns true if:proxyandargumentare of the same type- and
returns true for the
invalid reference
AbstractInvocationHandler#equalsInvocationHandlerofargument
- other method calls are dispatched to
.
invalid reference
#handleInvocation
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
handle
-
methodInvokerFor
attempts to guess the generic type params for the delegate's invocation function based on the supplied type -
toString
-