jsint
Class Generic

java.lang.Object
  extended byjsint.Procedure
      extended byjsint.Reflector
          extended byjsint.StaticReflector
              extended byjsint.Generic
All Implemented Interfaces:
java.lang.Runnable, SchemeProcedure, java.io.Serializable

public class Generic
extends StaticReflector

A generic function.

Author:
Ken R. Anderson, Copyright 2000, kanderso@bbn.com, license subsequently modified by Jscheme project members licensed under zlib licence (see license.txt)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jsint.StaticReflector
args0
 
Fields inherited from class jsint.Reflector
isPrivileged, reflectors
 
Fields inherited from class jsint.Procedure
maxArgs, minArgs, name
 
Constructor Summary
Generic(java.lang.String name)
           
 
Method Summary
 java.lang.Object apply(java.lang.Object[] args)
          Apply the procedure to an argument list, which is represented as a parameter-oriented array.
static Generic defineMethod(Symbol name, Pair types, Procedure p)
           
 Closure findMethod(java.lang.Object[] args)
           
 java.lang.Object[] getMethodTable()
           
protected  void reset()
          Reset your classpath dependent state.
 
Methods inherited from class jsint.StaticReflector
makeArgArray, makeArgArray
 
Methods inherited from class jsint.Reflector
readResolve, resetAll
 
Methods inherited from class jsint.Procedure
apply, apply, catching, getName, nParms, run, setName, stripExceptionWrapper, synchronize, throwObject, throwRuntimeException, toString, toStringArgs, tryCatch, tryFinally
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Generic

public Generic(java.lang.String name)
Method Detail

getMethodTable

public java.lang.Object[] getMethodTable()

defineMethod

public static Generic defineMethod(Symbol name,
                                   Pair types,
                                   Procedure p)

findMethod

public Closure findMethod(java.lang.Object[] args)

apply

public java.lang.Object apply(java.lang.Object[] args)
Description copied from class: Procedure
Apply the procedure to an argument list, which is represented as a parameter-oriented array. That is, if the procedure p has the parameter list (x y . z) and the call is (p 1 2 3 4) then args will be the array {1, 2, (3 4)}.

Specified by:
apply in interface SchemeProcedure
Specified by:
apply in class Procedure

reset

protected void reset()
Description copied from class: Reflector
Reset your classpath dependent state. This method can't be abstract.

Overrides:
reset in class Reflector