Changeset 4939


Ignore:
Timestamp:
12/02/03 14:20:38 (17 years ago)
Author:
dmcnaught
Message:

Added JAVA-OBJECT-P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Java.java

    r4846 r4939  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Java.java,v 1.25 2003-11-19 23:04:52 asimon Exp $
     5 * $Id: Java.java,v 1.26 2003-12-02 14:20:38 dmcnaught Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    370370        }
    371371    };
    372 
     372   
     373    private static final Primitive1 JAVA_OBJECT_P = new Primitive1("java-object-p", PACKAGE_JAVA)
     374    {
     375        public LispObject execute(LispObject arg) throws ConditionThrowable
     376        {
     377            if (arg instanceof JavaObject)
     378                return T;
     379            else
     380                return NIL;
     381        }
     382    };
     383       
    373384    // Supports Java primitive types too.
    374385    private static Class forClassRef(LispObject classRef) throws ClassNotFoundException, ConditionThrowable
     
    466477        export("JNEW", PACKAGE_JAVA);
    467478        export("JCALL", PACKAGE_JAVA);
     479        export("JAVA-OBJECT-P", PACKAGE_JAVA);
    468480    }
    469481}
Note: See TracChangeset for help on using the changeset viewer.