| java.lang.Object jsint.Procedure jsint.Reflector jsint.JavaMethod
JavaMethod | public class JavaMethod extends Reflector (Code) | | This class allows you to call any Java method, just by naming it,
and doing the dispatch at runtime.
author: Peter Norvig, Copyright 1998, peter@norvig.com, license author: subsequently modified by Jscheme project members author: licensed under zlib licence (see license.txt) |
JavaMethod | public JavaMethod(String name, Class c, boolean isStatic, boolean isPrivileged)(Code) | | If the method is static then Class c is not null. For instance
methods, if Class c is not null, then it is used at construction
time to create a method table. Otherwise, the class of the
method is determined at call time from the target, and the method
table is constructed then and cached. Examples (see DynamicVariable.java):
new JavaMethod("getProperties", System.class, true) - static method
new JavaMethod("put", Hashtable.class,false) - specific instance method.
new JavaMethod("put", null, false) - unspecified instance method
|
apply | public Object apply(Object[] args)(Code) | | For a static method, args is an Object[] of arguments.
For an instance method, args is (vector target (vector arguments));
|
isStatic | public boolean isStatic()(Code) | | |
reset | protected synchronized void reset()(Code) | | |
|
|