Documentation of 'org.hecl.java.JavaCmd' Java class
JavaCmd
org.hecl.java

Class JavaCmd

  • All Implemented Interfaces:
    ClassCommand, Command


    public class JavaCmd
    extends java.lang.Object
    implements ClassCommand, Command
    The JavaCmd class is utilized to implement Hecl commands that can interact with Java classes. The real work is done in the Reflector class, which maps between Hecl and Java types.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaCmd(java.lang.String clsname) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Thing cmdCode(Interp interp, Thing[] argv)
      The cmdCode method takes an interpreter and an array of Things, performs some calculations, and returns a Thing representing the computed value, or null.
      java.lang.Class getCmdClass() 
      java.lang.String getCmdName() 
      static void load(Interp ip, java.lang.String cname, java.lang.String cmd) 
      Thing method(Interp interp, ClassCommandInfo context, Thing[] argv)
      The method method takes an interpreter, a class information and an array of Things, performs some calculations, and returns a Thing which may be null.
      static void unload(Interp ip) 
      • Methods inherited from class java.lang.Object

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

      • cmdCode

        public Thing cmdCode(Interp interp,
                             Thing[] argv)
                      throws HeclException
        Description copied from interface: Command
        The cmdCode method takes an interpreter and an array of Things, performs some calculations, and returns a Thing representing the computed value, or null.
        Specified by:
        cmdCode in interface Command
        Parameters:
        interp - an Interp value
        argv - a Thing[] value
        Returns:
        A Thing representing the computed value, or null.
        Throws:
        HeclException - if an error occurs
      • method

        public Thing method(Interp interp,
                            ClassCommandInfo context,
                            Thing[] argv)
                     throws HeclException
        Description copied from interface: ClassCommand
        The method method takes an interpreter, a class information and an array of Things, performs some calculations, and returns a Thing which may be null. The interpreter calls this method when it detects an ObjectThing as first argument of a command on the script level and detects a command handler for the class of the value of the ObjectThing.
        Specified by:
        method in interface ClassCommand
        Parameters:
        interp - an Interp value
        context - A reference to the ClassInfo> describing further details of th emethod.
        argv - A Thing[] array holding the parameters for the method. The 0th element is the object, the 1st element is the method.
        Throws:
        HeclException - if an error occurs
      • getCmdClass

        public java.lang.Class getCmdClass()
      • getCmdName

        public java.lang.String getCmdName()
      • unload

        public static void unload(Interp ip)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.