Class RMInvocation

  • All Implemented Interfaces:
    RMArchiver.Archiving, java.lang.Cloneable

    public class RMInvocation
    extends RMObject
    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.Blending  
    • Constructor Summary

      Constructors 
      Constructor Description
      RMInvocation()
      Creates an uninitialized invocation.
      RMInvocation​(RMShapeAnim.RecordList aRecList, RMShapeAnim.Record aRecord)
      Creates a new invocation for the given record list and record.
      RMInvocation​(java.lang.Object target, java.lang.String action, java.lang.Object value)
      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
      RMInvocation blend​(RMInvocation other, float fraction)
      Returns an invocation by blending this invocation with given invocation using the given fraction of this invocation.
      java.lang.Object clone()
      Standard clone implementation.
      java.lang.Object getArg()
      Returns the arg for this invocaiton.
      java.lang.Class getArgClass()
      Returns the class of this invocation's arg.
      float getArgFloatValue()
      Returns the arg for this invocation as a float.
      java.lang.String getFunctionString()
      Returns the function string used for interpolating args for this invocation.
      java.lang.Object getTargetArg()
      Returns the result of executing this invocation on its target.
      java.lang.Object getTargetArg​(java.lang.Object anObj)
      Returns the result of executing this invocation on a given object.
      void invoke()
      Invoke method.
      void invoke​(java.lang.Object target)
      Invoke method on given target.
      void setAction​(java.lang.String action)
      Sets the action or method name for this invocation.
      void setArg​(java.lang.Object anObj)
      Sets the arg for this invocation.
      void setFunctionString​(java.lang.String aString)
      Sets the fuction string used for interpolating args 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 target,
                            java.lang.String action,
                            java.lang.Object value)
        Creates a new invocation for the given object, method name and value.
    • Method Detail

      • setAction

        public void setAction​(java.lang.String action)
        Sets the action or method name for this invocation.
      • getArg

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

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

        public float getArgFloatValue()
        Returns the arg for this invocation as a float.
      • getTargetArg

        public java.lang.Object getTargetArg()
        Returns the result of executing this invocation on its target.
      • getTargetArg

        public java.lang.Object getTargetArg​(java.lang.Object anObj)
        Returns the result of executing this invocation on a given object.
      • getArgClass

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

        public java.lang.String getFunctionString()
        Returns the function string used for interpolating args for this invocation.
      • setFunctionString

        public void setFunctionString​(java.lang.String aString)
        Sets the fuction string used for interpolating args for this invocation.
      • invoke

        public void invoke()
        Invoke method.
      • invoke

        public void invoke​(java.lang.Object target)
        Invoke method on given target.
      • blend

        public RMInvocation blend​(RMInvocation other,
                                  float fraction)
        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 RMObject
      • toString

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