1 21 22 package org.armedbear.lisp; 23 24 public class Primitive extends Function 25 { 26 public Primitive() 27 { 28 } 29 30 public Primitive(String name) 31 { 32 super(name); 33 } 34 35 public Primitive(String name, String arglist) 36 { 37 super(name,arglist); 38 } 39 40 public Primitive(String name, Package pkg) 41 { 42 super(name, pkg); 43 } 44 45 public Primitive(String name, Package pkg, boolean exported) 46 { 47 super(name, pkg, exported); 48 } 49 50 public Primitive(String name, Package pkg, boolean exported, 51 String 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 |