ScriptFunction
Date: 2019-10-22

org.jmol.script

## Class ScriptFunction

- java.lang.Object
- - org.jmol.script.ScriptFunction

- All Implemented Interfaces:
    JmolScriptFunction
  Direct Known Subclasses:
    ScriptParallelProcessor

      public class ScriptFunction
      extends java.lang.Object
      implements JmolScriptFunction

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) T[][]` | `aatoken`
    `(package private) int` | `chpt0`
    `(package private) int` | `cmdpt0`
    `(package private) int[][]` | `lineIndices`
    `(package private) short[]` | `lineNumbers`
    `(package private) java.lang.String` | `name`
    `(package private) javajs.util.Lst<java.lang.String>` | `names`
    `(package private) int` | `nParameters`
    `(package private) int` | `pt0`
    `(package private) SV` | `returnValue`
    `(package private) java.lang.String` | `script`
    `(package private) int` | `tok`
    `protected java.lang.String` | `typeName`
    `(package private) java.util.Map<java.lang.String,java.lang.String>` | `variables`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `ScriptFunction()`
    `protected` | `ScriptFunction(java.lang.String name, int tok)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `addVariable(java.lang.String name, boolean isParameter)`
    `java.lang.String` | `getName()`
    `java.lang.Object` | `geTokens()`
    `java.lang.String` | `getSignature()`
    `int` | `getTok()`
    `(package private) boolean` | `isVariable(java.lang.String ident)`
    `void` | `set(java.lang.String name, int tok)`
    `(package private) static void` | `setFunction(ScriptFunction function, java.lang.String script, int ichCurrentCommand, int pt, short[] lineNumbers, int[][] lineIndices, javajs.util.Lst<T[]> lltoken)`
    `private void` | `setScript(java.lang.String s)`
    `(package private) void` | `setVariables(java.util.Map<java.lang.String,SV> contextVariables, javajs.util.Lst<SV> params)`
    `java.lang.String` | `toString()`
    `(package private) void` | `unsetVariables(java.util.Map<java.lang.String,SV> contextVariables, javajs.util.Lst<SV> params)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### pt0

          int pt0

    - #### chpt0

          int chpt0

    - #### cmdpt0

          int cmdpt0

    - #### typeName

          protected java.lang.String typeName

    - #### name

          java.lang.String name

    - #### nParameters

          int nParameters

    - #### names

          javajs.util.Lst<java.lang.String> names

    - #### tok

          int tok

    - #### variables

          java.util.Map<java.lang.String,java.lang.String> variables

    - #### returnValue

          SV returnValue

    - #### aatoken

          T[][] aatoken

    - #### lineIndices

          int[][] lineIndices

    - #### lineNumbers

          short[] lineNumbers

    - #### script

          java.lang.String script

  - ### Constructor Detail

    - #### ScriptFunction

          public ScriptFunction()

    - #### ScriptFunction

          protected ScriptFunction(java.lang.String name,
                                   int tok)

  - ### Method Detail

    - #### isVariable

          boolean isVariable(java.lang.String ident)

    - #### set

          public void set(java.lang.String name,
                          int tok)

    - #### setVariables

          void setVariables(java.util.Map<java.lang.String,SV> contextVariables,
                            javajs.util.Lst<SV> params)

    - #### unsetVariables

          void unsetVariables(java.util.Map<java.lang.String,SV> contextVariables,
                              javajs.util.Lst<SV> params)

    - #### addVariable

          void addVariable(java.lang.String name,
                           boolean isParameter)

    - #### setFunction

          static void setFunction(ScriptFunction function,
                                  java.lang.String script,
                                  int ichCurrentCommand,
                                  int pt,
                                  short[] lineNumbers,
                                  int[][] lineIndices,
                                  javajs.util.Lst<T[]> lltoken)

    - #### setScript

          private void setScript(java.lang.String s)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getSignature

          public java.lang.String getSignature()

      Specified by:
        `getSignature` in interface `JmolScriptFunction`

    - #### geTokens

          public java.lang.Object geTokens()

      Specified by:
        `geTokens` in interface `JmolScriptFunction`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `JmolScriptFunction`

    - #### getTok

          public int getTok()

      Specified by:
        `getTok` in interface `JmolScriptFunction`