GNU Prolog for Java

gnu.prolog.vm
Class ExecuteOnlyCode

java.lang.Object
  extended by gnu.prolog.vm.ExecuteOnlyCode
All Implemented Interfaces:
Installable, PrologCode
Direct Known Subclasses:
DateTimePrologCode, Predicate_abolish, Predicate_append, Predicate_arg, Predicate_assert, Predicate_at_end_of_stream, Predicate_atom, Predicate_atom_chars, Predicate_atom_codes, Predicate_atom_concat, Predicate_atom_length, Predicate_atomic, Predicate_bagof, Predicate_call, Predicate_char_code, Predicate_char_conversion, Predicate_clause, Predicate_close, Predicate_compare, Predicate_compound, Predicate_copy_term, Predicate_current_char_conversion, Predicate_current_functor, Predicate_current_input, Predicate_current_op, Predicate_current_output, Predicate_current_predicate, Predicate_current_prolog_flag, Predicate_debugging, Predicate_dialog, Predicate_ensure_loaded, Predicate_equal, Predicate_findall, Predicate_float, Predicate_flush_output, Predicate_functor, Predicate_get_byte, Predicate_get_char, Predicate_get_time, Predicate_greater_than, Predicate_greater_than_or_equal, Predicate_halt, Predicate_integer, Predicate_is, Predicate_is_list, Predicate_java_classname, Predicate_java_object, Predicate_java_to_string, Predicate_length, Predicate_less_than, Predicate_less_than_or_equal, Predicate_listing, Predicate_member, Predicate_msort, Predicate_nonvar, Predicate_nospy, Predicate_nospyall, Predicate_not_equal, Predicate_not_unifiable, Predicate_notrace, Predicate_number, Predicate_number_chars, Predicate_number_codes, Predicate_op, Predicate_open, Predicate_peek_byte, Predicate_peek_char, Predicate_predsort, Predicate_put_byte, Predicate_put_char, Predicate_read_term, Predicate_retract, Predicate_set_input, Predicate_set_output, Predicate_set_prolog_flag, Predicate_set_stream_position, Predicate_sort, Predicate_spy, Predicate_stacktrace, Predicate_stream_property, Predicate_sub_atom, Predicate_term_greater_then, Predicate_term_greater_then_or_equal, Predicate_term_identical, Predicate_term_less_then, Predicate_term_less_then_or_equal, Predicate_term_not_identical, Predicate_trace, Predicate_tracing, Predicate_unify, Predicate_unify_with_occurs_check, Predicate_univ, Predicate_uuid, Predicate_var, Predicate_write_term, UndefinedPredicateCode

public abstract class ExecuteOnlyCode
extends Object
implements PrologCode

For Predicates which do not need to be installed or uninstalled. So that they don't all need to have empty methods.

Author:
Daniel Thomas

Field Summary
 
Fields inherited from interface gnu.prolog.vm.PrologCode
FAIL, HALT, SUCCESS, SUCCESS_LAST
 
Constructor Summary
ExecuteOnlyCode()
           
 
Method Summary
abstract  int execute(Interpreter interpreter, boolean backtrackMode, Term[] args)
          this method is used for execution of code
 void install(Environment env)
          Just an empty method as we don't need to do anything here.
 void uninstall(Environment env)
          Just an empty method as we don't need to do anything here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecuteOnlyCode

public ExecuteOnlyCode()
Method Detail

execute

public abstract int execute(Interpreter interpreter,
                            boolean backtrackMode,
                            Term[] args)
                     throws PrologException
Description copied from interface: PrologCode
this method is used for execution of code

Specified by:
execute in interface PrologCode
Parameters:
interpreter - interpreter in which context code is executed
backtrackMode - true if predicate is called on backtracking and false otherwise
args - arguments of code
Returns:
either SUCCESS, SUCCESS_LAST, or FAIL.
Throws:
PrologException

install

public void install(Environment env)
Just an empty method as we don't need to do anything here.

Specified by:
install in interface Installable
Parameters:
env - Environment to install the predicate
See Also:
Installable.install(gnu.prolog.vm.Environment)

uninstall

public void uninstall(Environment env)
Just an empty method as we don't need to do anything here.

Specified by:
uninstall in interface Installable
Parameters:
env - Environment to install the predicate
See Also:
Installable.uninstall(gnu.prolog.vm.Environment)

GNU Prolog for Java