Changeset 4218
- Timestamp:
- 10/06/03 13:51:18 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/JVar.java
r3906 r4218 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: JVar.java,v 1. 2 2003-09-19 17:42:09piso Exp $5 * $Id: JVar.java,v 1.3 2003-10-06 13:51:18 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 30 30 public final class JVar extends LispObject 31 31 { 32 private static final ArrayList variables = new ArrayList();33 34 32 private static final Symbol J_VARIABLE_VALUE = 35 33 LispAPI.PACKAGE_J_INTERNALS.addInternalSymbol("J-VARIABLE-VALUE"); 36 34 37 private Property property;35 private final Property property; 38 36 39 37 private JVar(String name, Property property) … … 59 57 { 60 58 LispObject obj = get(symbol, J_VARIABLE_VALUE, null); 61 if ( !(obj instanceof JVar))62 throw new ConditionThrowable(new LispError(String.valueOf(symbol) +63 " is not defined as an editor variable"));64 return (JVar) obj;59 if (obj instanceof JVar) 60 return (JVar) obj; 61 throw new ConditionThrowable(new LispError(String.valueOf(symbol) + 62 " is not defined as an editor variable")); 65 63 } 66 64 67 public static void addVariableForProperty(Property property)65 public static synchronized void addVariableForProperty(Property property) 68 66 { 69 variables.add(new JVar(property.getLispName(), property)); 67 new JVar(property.getLispName(), property); 68 } 69 70 public String toString() 71 { 72 FastStringBuffer sb = new FastStringBuffer("#<J-VARIABLE @ #x"); 73 sb.append(Integer.toHexString(hashCode())); 74 sb.append(">"); 75 return sb.toString(); 70 76 } 71 77 }
Note: See TracChangeset
for help on using the changeset viewer.