Changeset 12037


Ignore:
Timestamp:
07/11/09 12:46:04 (14 years ago)
Author:
ehuelsmann
Message:

Add a method to LispObject to be used with the Java locking API.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/JavaObject.java

    r11754 r12037  
    175175    {
    176176        return javaInstance();
     177    }
     178
     179    /** Returns the encapsulated Java object for
     180     * interoperability with wait, notify, synchronized, etc.
     181     *
     182     * @return The encapsulated object
     183     */
     184    @Override
     185    public Object lockableInstance() {
     186        return obj;
    177187    }
    178188
  • trunk/abcl/src/org/armedbear/lisp/LispObject.java

    r11951 r12037  
    113113  }
    114114
     115  /** This method returns 'this' by default, but allows
     116   * objects to return different values to increase Java
     117   * interoperability
     118   *
     119   * @return An object to be used with synchronized, wait, notify, etc
     120   * @throws org.armedbear.lisp.ConditionThrowable
     121   */
     122  public Object lockableInstance() throws ConditionThrowable
     123  {
     124      return this;
     125  }
     126
     127
    115128  public LispObject car() throws ConditionThrowable
    116129  {
Note: See TracChangeset for help on using the changeset viewer.