Class RMInvocation

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class RMInvocation
    extends java.lang.Object
    implements java.lang.Cloneable
    This class represent a method call and is used to set values on another object, either by calling a "setFoo()" method or by directly setting the value of a public instance variable. The action string is always of the form "setFoo:". If the target object has a setFoo() method, that method will get called. If not, but it has a "foo" or "_foo" instance variable, that variable will get stuffed with the value.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  RMInvocation.Blend
      Implemented by any class that can interpolate themselves for animation purposes.
    • Constructor Summary

      Constructors 
      Constructor Description
      RMInvocation()
      Creates an uninitialized invocation.
      RMInvocation​(java.lang.Object aTarget, java.lang.String anAction, java.lang.Object aValue)
      Creates a new invocation for the given object, method name and value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()
      Standard clone implementation.
      java.lang.String getAction()
      Returns the action for this invocation.
      java.lang.Object getArg()
      Returns the arg for this invocation.
      java.lang.Class getArgClass()
      Returns the class of this invocation's arg.
      RMInvocation getInterpolation​(double aFraction, RMInvocation other)
      Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.
      java.lang.Object getTarget()
      Returns the target for this invocation.
      void invoke()
      Invoke method.
      void setArg​(java.lang.Object anObj)
      Sets the arg for this invocation.
      java.lang.String toString()
      Returns a string representation of this invocation.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RMInvocation

        public RMInvocation()
        Creates an uninitialized invocation.
      • RMInvocation

        public RMInvocation​(java.lang.Object aTarget,
                            java.lang.String anAction,
                            java.lang.Object aValue)
        Creates a new invocation for the given object, method name and value.
    • Method Detail

      • getTarget

        public java.lang.Object getTarget()
        Returns the target for this invocation.
      • getAction

        public java.lang.String getAction()
        Returns the action for this invocation.
      • getArg

        public java.lang.Object getArg()
        Returns the arg for this invocation.
      • setArg

        public void setArg​(java.lang.Object anObj)
        Sets the arg for this invocation.
      • getArgClass

        public java.lang.Class getArgClass()
        Returns the class of this invocation's arg.
      • invoke

        public void invoke()
        Invoke method.
      • getInterpolation

        public RMInvocation getInterpolation​(double aFraction,
                                             RMInvocation other)
        Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.
      • clone

        public java.lang.Object clone()
        Standard clone implementation.
        Overrides:
        clone in class java.lang.Object
      • toString

        public java.lang.String toString()
        Returns a string representation of this invocation.
        Overrides:
        toString in class java.lang.Object