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

## gnu.prolog.vm.interpreter.instruction
Class ICall

    java.lang.Object
      gnu.prolog.vm.interpreter.instruction.Instruction
          gnu.prolog.vm.interpreter.instruction.ICall

All Implemented Interfaces:
  Installable, PrologCodeListener, EventListener

    public class ICall

extends Instruction
implements PrologCodeListener

call instruction.

Field Summary
`PrologCode` | `code` code to call, if predicate is dynamic it changes after each update
`CompoundTermTag` | `tag` tag of predicate to call

Fields inherited from class gnu.prolog.vm.interpreter.instruction.Instruction
`codePosition`

Constructor Summary
`ICall(CompoundTermTag tag)` a constructor

Method Summary
`protected void` | `ensureLoaded(Environment env)` ensure that code is loaded in predicate
`int` | `execute(ExecutionState state, BacktrackInfo bi)` execute call instruction within specified sate
`void` | `install(Environment env)` install instruction to environment
`void` | `prologCodeUpdated(PrologCodeUpdatedEvent evt)` notify instruction that prolog code for predicate was updated
`String` | `toString()` convert instruction to string
`void` | `uninstall(Environment env)` uninstall instruction from environment

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

Field Detail

### tag

    public CompoundTermTag tag

  tag of predicate to call

### code

    public transient PrologCode code

  code to call, if predicate is dynamic it changes after each update

Constructor Detail

### ICall

    public ICall(CompoundTermTag tag)

  a constructor

  Parameters:
    `tag` -

Method Detail

### toString

    public String toString()

  convert instruction to string

  Overrides:
    `toString` in class `Object`

### execute

    public int execute(ExecutionState state,
                       BacktrackInfo bi)
                throws PrologException

  execute call instruction within specified sate

  Specified by:
    `execute` in class `Instruction`
  Parameters:
    `state` - state within which instruction will be executed
  Returns:
    instruction to caller how to execute next instruction
  Throws:
    `PrologException` - if code is throwing prolog exception

### prologCodeUpdated

    public void prologCodeUpdated(PrologCodeUpdatedEvent evt)

  notify instruction that prolog code for predicate was updated

  Specified by:
    `prologCodeUpdated` in interface `PrologCodeListener`

### install

    public void install(Environment env)

  install instruction to environment

  Specified by:
    `install` in interface `Installable`
  Overrides:
    `install` in class `Instruction`

### uninstall

    public void uninstall(Environment env)

  uninstall instruction from environment

  Specified by:
    `uninstall` in interface `Installable`
  Overrides:
    `uninstall` in class `Instruction`

### ensureLoaded

    protected void ensureLoaded(Environment env)
                         throws PrologException

  ensure that code is loaded in predicate

  Parameters:
    `env` -
  Throws:
    `PrologException`

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