Documentation of 'org.hecl.CodeThing' Java class
CodeThing
org.hecl

Class CodeThing

  • All Implemented Interfaces:
    RealThing


    public class CodeThing
    extends java.lang.Object
    implements RealThing
    The CodeThing class implements a chunk of "compiled" code including multiple "Stanzas", or individual commands.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      boolean marksubst 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addStanza(Interp interp, Thing[] argv, int lineno)
      The addStanza method adds a new command and its arguments.
      RealThing deepcopy()
      CodeThing's deepcopy method makes a copy of all the stanzas, which in turn copy all their objects.
      static CodeThing get(Interp interp, Thing thing)
      get returns a CodeThing object from any kind of Thing - or returns an error.
      java.lang.String getStringRep()
      The getStringRep method returns a String representation of the commands it represents.
      Thing run(Interp interp)
      The run method runs the CodeThing.
      java.lang.String thingclass() 
      • Methods inherited from class java.lang.Object

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

      • marksubst

        public boolean marksubst
    • Method Detail

      • thingclass

        public java.lang.String thingclass()
        Specified by:
        thingclass in interface RealThing
      • get

        public static CodeThing get(Interp interp,
                                    Thing thing)
                             throws HeclException
        get returns a CodeThing object from any kind of Thing - or returns an error.
        Parameters:
        interp - an Interp value
        thing - a Thing value
        Returns:
        a CodeThing value
        Throws:
        HeclException - if an error occurs
      • deepcopy

        public RealThing deepcopy()
                           throws HeclException
        CodeThing's deepcopy method makes a copy of all the stanzas, which in turn copy all their objects.
        Specified by:
        deepcopy in interface RealThing
        Returns:
        a RealThing value
        Throws:
        HeclException - if an error occurs
      • addStanza

        public void addStanza(Interp interp,
                              Thing[] argv,
                              int lineno)
        The addStanza method adds a new command and its arguments.
        Parameters:
        interp - Interp value
        argv - Thing[] value
        lineno -
      • getStringRep

        public java.lang.String getStringRep()
        The getStringRep method returns a String representation of the commands it represents.
        Specified by:
        getStringRep in interface RealThing
        Returns:
        a String value.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.