Class MethodInvoker
- java.lang.Object
-
- io.leangen.graphql.metadata.execution.Executable<Method>
-
- io.leangen.graphql.metadata.execution.MethodInvoker
-
- Direct Known Subclasses:
FixedMethodInvoker
public class MethodInvoker extends Executable<Method>
Created by bojan.tomic on 7/20/16.
-
-
Constructor Summary
Constructors Constructor Description MethodInvoker(Method resolverMethod, AnnotatedType enclosingType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectexecute(Object target, Object[] args)AnnotatedType[]getAnnotatedParameterTypes()intgetParameterCount()Returns the number of formal parameters this executable takes.Parameter[]getParameters()AnnotatedTypegetReturnType()-
Methods inherited from class io.leangen.graphql.metadata.execution.Executable
equals, getDelegate, hashCode, toString
-
-
-
-
Constructor Detail
-
MethodInvoker
public MethodInvoker(Method resolverMethod, AnnotatedType enclosingType)
-
-
Method Detail
-
execute
public Object execute(Object target, Object[] args) throws InvocationTargetException, IllegalAccessException
- Specified by:
executein classExecutable<Method>- Throws:
InvocationTargetExceptionIllegalAccessException
-
getReturnType
public AnnotatedType getReturnType()
- Specified by:
getReturnTypein classExecutable<Method>
-
getParameterCount
public int getParameterCount()
Returns the number of formal parameters this executable takes. May differ fromgetParameters().length.- Specified by:
getParameterCountin classExecutable<Method>- Returns:
- The number of formal parameter this executable takes
- See Also:
Executable.getParameterCount()
-
getAnnotatedParameterTypes
public AnnotatedType[] getAnnotatedParameterTypes()
- Specified by:
getAnnotatedParameterTypesin classExecutable<Method>
-
getParameters
public Parameter[] getParameters()
- Specified by:
getParametersin classExecutable<Method>
-
-