1 21 22 package org.armedbear.lisp; 23 24 public class SpecialOperator extends Functional 25 { 26 private final String name; 27 private final int index; 28 29 private int callCount; 30 31 public SpecialOperator(String name) 32 { 33 this.name = name.toUpperCase(); 34 this.index = 0; 35 setLambdaName(Symbol.addFunction(this.name, this)); 36 } 37 38 public SpecialOperator(String name, String arglist) 39 { 40 this(name); 41 setArglist(new SimpleString(arglist)); 42 } 43 44 public final int getFunctionalType() 45 { 46 return FTYPE_SPECIAL_OPERATOR; 47 } 48 49 public final String getName() 50 { 51 return name; 52 } 53 54 public String toString() 55 { 56 StringBuffer sb = new StringBuffer ("#<SPECIAL-OPERATOR "); 57 sb.append(name); 58 sb.append(">"); 59 return sb.toString(); 60 } 61 62 public final int getCallCount() 64 { 65 return callCount; 66 } 67 68 public final void setCallCount(int n) 69 { 70 callCount = n; 71 } 72 73 public final void incrementCallCount() 74 { 75 ++callCount; 76 } 77 } 78 | Popular Tags |