Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

silk
Class Generic  view Generic download Generic.java

java.lang.Object
  extended bysilk.Procedure
      extended bysilk.Generic
All Implemented Interfaces:
java.lang.Runnable

public class Generic
extends Procedure


Field Summary
private  java.lang.Object[] methodTable
           
 
Fields inherited from class silk.Procedure
maxArgs, minArgs, name
 
Constructor Summary
Generic(java.lang.String name)
           
 
Method Summary
private  void addMethod(java.lang.Class[] types, Procedure p)
           
 java.lang.Object apply(java.lang.Object[] args)
          Apply the method to a list of arguments.
static Generic defineMethod(Symbol name, Pair types, Procedure p)
           
private static Generic ensureGeneric(Symbol name)
           
 java.lang.Object[] getMethodTable()
           
private  void grow()
           
private  void install(int i, java.lang.Class[] types, Procedure p)
           
 
Methods inherited from class silk.Procedure
apply, makeArgArray, makeArgArray, nParms, run, setName, throwObject, throwRuntimeException, toString, toStringArgs, tryCatch, tryFinally
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

methodTable

private java.lang.Object[] methodTable
Constructor Detail

Generic

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

getMethodTable

public java.lang.Object[] getMethodTable()

apply

public java.lang.Object apply(java.lang.Object[] args)
Apply the method to a list of arguments.

Specified by:
apply in class Procedure

addMethod

private void addMethod(java.lang.Class[] types,
                       Procedure p)

install

private void install(int i,
                     java.lang.Class[] types,
                     Procedure p)

grow

private void grow()

ensureGeneric

private static Generic ensureGeneric(Symbol name)

defineMethod

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