Class Invocation

java.lang.Object
org.apache.cayenne.util.Invocation

public class Invocation extends Object
Invocation represents a dynamic method invocation bound to a specific target. The target is kept with a WeakReference and can therefore be reclaimed by the Garbage Collector.
  • Constructor Details

  • Method Details

    • fire

      public boolean fire()
      Invoke the target's method without any arguments.
      See Also:
    • fire

      public boolean fire(Object argument)
      Invoke the target's method with a single argument.
      Parameters:
      argument - an object passed to the target's method
      See Also:
    • fire

      public boolean fire(Object[] arguments)
      Invoke the target's method with an arbitrary number of arguments. The number of arguments must be consistent with the arguments given at construction time of this Invocation.
      Parameters:
      arguments - an array of objects passed to the target's method
      Returns:
      true if invocation of the method succeeded, otherwise false.
      Throws:
      IllegalArgumentException - if the passed arguments are inconsistent with the arguments passed to this instance's constructor
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • getMethod

      public Method getMethod()
      Returns:
      the method to be invoked on the target
    • getTarget

      public Object getTarget()
      Returns:
      the target object of this Invocation
    • getParameterTypes

      public Class[] getParameterTypes()
      Returns:
      an array of Classes describing the target method's parameters