Package org.apache.juneau.rest.stats
Class MethodInvoker
java.lang.Object
org.apache.juneau.rest.stats.MethodInvoker
- Direct Known Subclasses:
- RestOpInvoker
A wrapper around a 
Method.invoke(Object, Object...) method that allows for basic instrumentation.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionConvenience method for callinginner().getDeclaringClass() Convenience method for callinginner().getName() getStats()Returns the stats of this method invoker.inner()Returns the inner method.Invokes the underlying method.Invokes the wrapped method using parameters from the specified bean store.
- 
Constructor Details- 
MethodInvokerConstructor.- Parameters:
- m- The method being wrapped.
- stats- The instrumentor.
 
 
- 
- 
Method Details- 
innerReturns the inner method.- Returns:
- The inner method.
 
- 
invokepublic Object invoke(Object o, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException Invokes the underlying method.- Parameters:
- o- The object the underlying method is invoked from.
- args- The arguments used for the method call.
- Returns:
- The result of dispatching the method represented by this object on objwith parametersargs
- Throws:
- IllegalAccessException- If method cannot be accessed.
- IllegalArgumentException- If wrong arguments were passed to method.
- InvocationTargetException- If method threw an exception.
 
- 
invokepublic Object invoke(BeanStore beanStore, Object o) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException Invokes the wrapped method using parameters from the specified bean store.- Parameters:
- beanStore- The bean store to use to resolve parameters.
- o- The object to invoke the method on.
- Returns:
- The result of invoking the method.
- Throws:
- IllegalAccessException- If method cannot be accessed.
- IllegalArgumentException- If wrong arguments were passed to method.
- InvocationTargetException- If method threw an exception.
 
- 
getDeclaringClassConvenience method for callinginner().getDeclaringClass() - Returns:
- The declaring class of the method.
 
- 
getFullNameConvenience method for callinginner().getName() - Returns:
- The name of the method.
 
- 
getStatsReturns the stats of this method invoker.- Returns:
- The stats of this method invoker.
 
 
-