com.svincent.moksa
Class JavaInterface.Java_method_3

java.lang.Object
  |
  +--com.svincent.moksa.WamObject
        |
        +--com.svincent.moksa.Rule
              |
              +--com.svincent.moksa.Builtin.BuiltinRule
                    |
                    +--com.svincent.moksa.JavaInterface.JavaRule
                          |
                          +--com.svincent.moksa.JavaInterface.Java_method_3
Enclosing class:
JavaInterface

public static class JavaInterface.Java_method_3
extends JavaInterface.JavaRule

Calls a method on a class or instance..

java_method (+class_or_instance, +method, -return_value)

Here's a data conversion chart. The list of conversions will grow when I get a chance.

     Prolog                  Java
     -------------------------------------------------
     integer         --      java.lang.Integer or int
     atom            --      java.lang.String
     list            --      java.lang.Object[]
     java term       --      object
 

The idea and syntax for this predicate came from Prolog Cafe


Constructor Summary
JavaInterface.Java_method_3()
           
 
Method Summary
static java.lang.Object convertToJava(PrologTerm o)
           
 int getArity()
          Return the arity of this Rule (i.e.
 java.lang.String getName()
          Return the name of this Rule in "atom/arity" notation.
 Continuation invokeRule(Wam wam)
          Contains the code which defines what this Rule does.
 
Methods inherited from class com.svincent.moksa.Builtin.BuiltinRule
getTerm, makeTerm
 
Methods inherited from class com.svincent.moksa.Rule
invoke, isFirstAlternative, isLastAlternative, isOnlyAlternative, tag
 
Methods inherited from class com.svincent.moksa.WamObject
tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaInterface.Java_method_3

public JavaInterface.Java_method_3()
Method Detail

getName

public java.lang.String getName()
Description copied from class: Rule
Return the name of this Rule in "atom/arity" notation.
Overrides:
getName in class Rule

getArity

public int getArity()
Description copied from class: Rule
Return the arity of this Rule (i.e. - the number of parameters it expects).
Overrides:
getArity in class Rule

invokeRule

public Continuation invokeRule(Wam wam)
                        throws PrologException
Description copied from class: Rule
Contains the code which defines what this Rule does. Called by invoke.
Overrides:
invokeRule in class Rule
Tags copied from class: Rule
See Also:
Rule.invoke(com.svincent.moksa.Wam)

convertToJava

public static java.lang.Object convertToJava(PrologTerm o)
                                      throws PrologException



This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/

Copyright © 1999 Shawn P. Vincent.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.