org.apache.commons.beanutils2
Interface ArgumentsAccessor
public interface ArgumentsAccessor
A ArgumentAccessor can be used to pass arguments to a constructor or method.
withArguments
BeanAccessor<?> withArguments(Argument<?>... arguments)
throws IllegalArgumentException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException
- Passes the given arguments to the called constructor or method. Note that if you wont to pass primitive
arguments, you have to call
Argument.argument(Class, Object) and pass the primitive class. This
especially applies if you called ClassAccessor.invokeExactConstructor(Argument...),
ClassAccessor.invokeExactStatic(String) or BeanAccessor.invokeExact(String) before.
- Parameters:
arguments - the arguments to be passed. May be empty.
- Returns:
- a
BeanAccessor for the result of the method invocation.
- Throws:
IllegalArgumentException - if the invoking the constructor or method would throw one.
IllegalAccessException - if the invoked constructor or method would throw one.
InvocationTargetException - TODO
NoSuchMethodException - if no method with a fitting signature can be found.
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.