01: package jsint;
02:
03: /**
04: A procedure that invokes a Constructor.
05: * @author Ken R. Anderson, Copyright 2000, kanderso@bbn.com, <a href="license.txt">license</a>
06: * subsequently modified by Jscheme project members
07: * licensed under zlib licence (see license.txt)
08: */
09:
10: import java.lang.reflect.Constructor;
11:
12: public class RawConstructor extends Procedure {
13: private Constructor method;
14:
15: public RawConstructor(Constructor method) {
16: this .method = method;
17: this .minArgs = method.getParameterTypes().length;
18: this .maxArgs = minArgs;
19: }
20:
21: public Object apply(Object[] args) {
22: return Invoke.invokeRawConstructor(method, args);
23: }
24: }
|