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

Quick Search    Search Deep

com.memoire.silk
Class SilkJavaMethod  view SilkJavaMethod download SilkJavaMethod.java

java.lang.Object
  extended bycom.memoire.silk.SilkSchemeUtils
      extended bycom.memoire.silk.SilkProcedure
          extended bycom.memoire.silk.SilkJavaMethod

public class SilkJavaMethod
extends SilkProcedure


Field Summary
(package private)  java.lang.Class[] argClasses
           
(package private)  boolean isStatic
           
(package private)  java.lang.reflect.Method method
           
 
Fields inherited from class com.memoire.silk.SilkProcedure
name
 
Fields inherited from class com.memoire.silk.SilkSchemeUtils
FALSE, ONE, TRUE, ZERO
 
Constructor Summary
SilkJavaMethod(java.lang.String methodName, java.lang.Object targetClassName, java.lang.Object argClassNames)
           
 
Method Summary
 java.lang.Object apply(SilkScheme interpreter, java.lang.Object args)
          Apply the method to a list of arguments.
 java.lang.Class[] classArray(java.lang.Object args)
          Convert a list of class names into an array of Classes.
 java.lang.Object[] toArray(java.lang.Object args)
          Convert a list of Objects into an array.
static java.lang.Class toClass(java.lang.Object arg)
           
 
Methods inherited from class com.memoire.silk.SilkProcedure
proc, toString
 
Methods inherited from class com.memoire.silk.SilkSchemeUtils
chr, chr, cons, equal, eqv, error, first, inPort, length, list, list, listStar, listToString, listToVector, num, num, outPort, p, p, rest, reverse, second, setFirst, setRest, str, stringify, stringify, stringify, sym, third, truth, truth, vec, vectorToList, warn, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

argClasses

java.lang.Class[] argClasses

method

java.lang.reflect.Method method

isStatic

boolean isStatic
Constructor Detail

SilkJavaMethod

public SilkJavaMethod(java.lang.String methodName,
                      java.lang.Object targetClassName,
                      java.lang.Object argClassNames)
Method Detail

apply

public java.lang.Object apply(SilkScheme interpreter,
                              java.lang.Object args)
Apply the method to a list of arguments.

Specified by:
apply in class SilkProcedure

toClass

public static java.lang.Class toClass(java.lang.Object arg)
                               throws java.lang.ClassNotFoundException

toArray

public java.lang.Object[] toArray(java.lang.Object args)
Convert a list of Objects into an array. Peek at the argClasses array to see what's expected. That enables us to convert between Double and Integer, something Java won't do automatically.


classArray

public java.lang.Class[] classArray(java.lang.Object args)
                             throws java.lang.ClassNotFoundException
Convert a list of class names into an array of Classes.