Class Engine.Sub<R>

  • All Implemented Interfaces:
    Subroutine<R>
    Enclosing class:
    Engine

    public class Engine.Sub<R>
    extends java.lang.Object
    implements Subroutine<R>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      R call()
      Call a subroutine without any argument.
      R call​(java.lang.Object... args)
      Call the subroutine.
      java.lang.String name()
      Get the name of the subroutine.
      int numberOfArguments()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • numberOfArguments

        public int numberOfArguments()
        Specified by:
        numberOfArguments in interface Subroutine<R>
        Returns:
        the number of arguments the subroutine expects when invoked
      • name

        public java.lang.String name()
        Description copied from interface: Subroutine
        Get the name of the subroutine. Even though the instance of the interface is usually acquired knowing the name of the subroutine this method can be used to access this information.
        Specified by:
        name in interface Subroutine<R>
        Returns:
        the name of the subroutine
      • call

        public R call​(java.lang.Object... args)
               throws ScriptBasicException
        Description copied from interface: Subroutine
        Call the subroutine.
        Specified by:
        call in interface Subroutine<R>
        Parameters:
        args - the arguments passed to the subroutine
        Returns:
        the return value of the subroutine
        Throws:
        ScriptBasicException - when an BASIC error happens during the execution of the subroutine