public class Invocation extends Object
Constructor and Description |
---|
Invocation(Object target,
String methodName)
Constructor for an Invocation without arguments in the target's method.
|
Invocation(Object target,
String methodName,
Class parameterType)
Constructor for an Invocation with a single argument in the target's method.
|
Invocation(Object target,
String methodName,
Class[] parameterTypes)
Constructor for an Invocation with arbitrary arguments in the target's method.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
fire()
Invoke the target's method without any arguments.
|
boolean |
fire(Object argument)
Invoke the target's method with a single argument.
|
boolean |
fire(Object[] arguments)
Invoke the target's method with an arbitrary number of arguments.
|
Method |
getMethod() |
Class[] |
getParameterTypes() |
Object |
getTarget() |
int |
hashCode() |
public Invocation(Object target, String methodName) throws NoSuchMethodException
NoSuchMethodException
Invocation(Object, String, Class[])
public Invocation(Object target, String methodName, Class parameterType) throws NoSuchMethodException
NoSuchMethodException
Invocation(Object, String, Class[])
public Invocation(Object target, String methodName, Class[] parameterTypes) throws NoSuchMethodException
target
- methodName
- parameterTypes
- NoSuchMethodException
- if methodName
could not be found in
the targetIllegalArgumentException
- if target or methodName are null
,
or parameterTypes is empty or contains null
elementspublic boolean fire()
fire(Object[])
public boolean fire(Object argument)
argument
- an object passed to the target's methodfire(Object[])
public boolean fire(Object[] arguments)
arguments
- an array of objects passed to the target's methodtrue
if invocation of the method succeeded, otherwise
false
.IllegalArgumentException
- if the passed arguments are inconsistent with the
arguments passed to this instance's constructorfire(Object[])
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Method getMethod()
public Object getTarget()
public Class[] getParameterTypes()
Copyright © 2001–2017 Apache Cayenne. All rights reserved.