Changeset 10219


Ignore:
Timestamp:
10/25/05 12:20:03 (16 years ago)
Author:
asimon
Message:

JCLASS-NAME accepts a second argument as per the jlinker docs

File:
1 edited

Legend:

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

    r7509 r10219  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: java.lisp,v 1.17 2004-08-28 12:55:56 asimon Exp $
     4;;; $Id: java.lisp,v 1.18 2005-10-25 12:20:03 asimon Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    6060    (apply #'%jnew-proxy interface method-names-and-defs)))
    6161
    62 (defun jclass-name (class)
    63   "Returns the name of CLASS as a Lisp string"
    64   (jcall (jmethod "java.lang.Class" "getName") class))
     62(defun jclass-name (class &optional name)
     63  "Returns the name of CLASS as a Lisp string, or, if NAME is given, returns T if
     64it's the name of the CLASS and NIL otherwise."
     65  (let ((class-name (jcall (jmethod "java.lang.Class" "getName") class)))
     66    (if name (string= name class-name) class-name)))
    6567
    6668(defun jobject-class (obj)
Note: See TracChangeset for help on using the changeset viewer.