KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > armedbear > lisp > Primitive


1 /*
2  * Primitive.java
3  *
4  * Copyright (C) 2002-2003 Peter Graves
5  * $Id: Primitive.java,v 1.10 2004/04/16 01:07:30 piso Exp $
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */

21
22 package org.armedbear.lisp;
23
24 public class Primitive extends Function
25 {
26     public Primitive()
27     {
28     }
29
30     public Primitive(String JavaDoc name)
31     {
32         super(name);
33     }
34
35     public Primitive(String JavaDoc name, String JavaDoc arglist)
36     {
37         super(name,arglist);
38     }
39
40     public Primitive(String JavaDoc name, Package JavaDoc pkg)
41     {
42         super(name, pkg);
43     }
44
45     public Primitive(String JavaDoc name, Package JavaDoc pkg, boolean exported)
46     {
47         super(name, pkg, exported);
48     }
49
50     public Primitive(String JavaDoc name, Package JavaDoc pkg, boolean exported,
51                      String JavaDoc arglist)
52     {
53         super(name, pkg, exported, arglist);
54     }
55
56     public LispObject execute() throws ConditionThrowable
57     {
58         LispObject[] args = new LispObject[0];
59         return execute(args);
60     }
61
62     public LispObject execute(LispObject arg) throws ConditionThrowable
63     {
64         LispObject[] args = new LispObject[1];
65         args[0] = arg;
66         return execute(args);
67     }
68
69     public LispObject execute(LispObject first, LispObject second)
70         throws ConditionThrowable
71     {
72         LispObject[] args = new LispObject[2];
73         args[0] = first;
74         args[1] = second;
75         return execute(args);
76     }
77
78     public LispObject execute(LispObject first, LispObject second,
79                               LispObject third)
80         throws ConditionThrowable
81     {
82         LispObject[] args = new LispObject[3];
83         args[0] = first;
84         args[1] = second;
85         args[2] = third;
86         return execute(args);
87     }
88
89     public LispObject execute(LispObject first, LispObject second,
90                               LispObject third, LispObject fourth)
91         throws ConditionThrowable
92     {
93         LispObject[] args = new LispObject[4];
94         args[0] = first;
95         args[1] = second;
96         args[2] = third;
97         args[3] = fourth;
98         return execute(args);
99     }
100 }
101
Popular Tags