Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util.lisp
Class Interpreter.JFunction

    java.lang.Object
      ix.util.lisp.Interpreter.AbstractFunction
          ix.util.lisp.Interpreter.JFunction

All Implemented Interfaces:
  Interpreter.Function

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.

Field Summary
`protected int` | `arity`
`protected Symbol` | `name`

Fields inherited from interface ix.util.lisp.Interpreter.Function
`ANY_ARITY`

Constructor Summary
`Interpreter.JFunction(java.lang.String name, int arity)`
`Interpreter.JFunction(Symbol name, int arity)`

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 ix.util.lisp.Interpreter.AbstractFunction
`checkArity, mustBe`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface ix.util.lisp.Interpreter.Function
`applyTo`

Field Detail

### name

    protected Symbol name

### arity

    protected int arity

Constructor Detail

### Interpreter.JFunction

    public Interpreter.JFunction(java.lang.String name,
                                 int arity)

### Interpreter.JFunction

    public Interpreter.JFunction(Symbol name,
                                 int arity)

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD