ix.util.lisp
Class Interpreter.JFunction
java.lang.Object
ix.util.lisp.Interpreter.AbstractFunction
ix.util.lisp.Interpreter.JFunction
- All Implemented Interfaces:
- Interpreter.Function
- Direct Known Subclasses:
- ComputeExtensionExample.ExampleFunction
- Enclosing class:
- Interpreter
public abstract static class Interpreter.JFunction
- extends Interpreter.AbstractFunction
A function implemented in Java.
This class makes isSafe()
return true;
a subclass should override that method if it is unsafe.
Method Summary |
int |
getArity()
Returns the number of arguments this function expects. |
boolean |
isSafe()
Says whether the function can safely be used in cases where
you don't want the user to be able to read or write files
or to get other information about the host machine. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected Symbol name
arity
protected int arity
Interpreter.JFunction
public Interpreter.JFunction(java.lang.String name,
int arity)
Interpreter.JFunction
public Interpreter.JFunction(Symbol name,
int arity)
getArity
public int getArity()
- Description copied from interface:
Interpreter.Function
- Returns the number of arguments this function expects.
If the function can take any number of arguments,
the value is
Interpreter.Function.ANY_ARITY
.
isSafe
public boolean isSafe()
- Says whether the function can safely be used in cases where
you don't want the user to be able to read or write files
or to get other information about the host machine.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object