Changeset 13394

07/11/11 13:57:21 (12 years ago)
Mark Evenson

Ensure that ASDF jar-file always loaded when encountered.

JSS:NEW is no longer deprecated.

Documentation improvements.

Update to version jss-2.1.0.

4 edited


  • trunk/abcl/contrib/jss/README.markdown

    r13363 r13394  
    3030class. In your call to new, as long as the symbol can refer to only
    3131one class, we use that class. In this case, it is
    32 You could also have written (new
    33 'io.stringwriter), (new '|io.StringWriter|), (new
    34 ' You could also have written
    36 the call (#"write" sw "Hello "), uses the code in to
    37 call the method named "write" with the arguments sw and "Hello ".
    38 JSS figures out the right java method to call, and calls it.
     34     (new 'io.stringwriter)
     37     (new '|io.StringWriter|)
     40     (new '
     42The call
     44     (#"write" sw "Hello ")
     46uses the code in to call the method named "write" with
     47the arguments sw and "Hello ".  JSS figures out the right java method
     48to call, and calls it.
     50Static calls are possible as well with the #" macro, but the
     51first argument MUST BE A SYMBOL to distinguish
     53     (#"getProperties" "java.lang.System")
     57     (#"getProperties" 'java.lang.System)     
     59The first attempts to call a method on the java.lang.String object
     60with the contents "java.lang.System", which results in an error, while
     61the second invokes the static java.lang.System.getProperties() method.     
    4063If you want to do a raw java call, use #0"toString". Raw calls
    4265object to Lisp object conversions that ABCL does.
    44 (with-constant-signature ((name jname raw?)*) &body body)
     68    (with-constant-signature ((name jname raw?)*) &body body)
    4570binds a macro which expands to a jcall, promising that the same method
    4671will be called every time. Use this if you are making a lot of calls and
    4772want to avoid the overhead of a the dynamic dispatch.
    48 e.g. (with-constant-signature ((tostring "toString"))
     75    (with-constant-signature ((tostring "toString"))
    4976        (time (dotimes (i 10000) (tostring "foo"))))
    50 runs about 3x faster than (time (dotimes (i 10000) (#"toString" "foo")))
    52 (with-constant-signature ((tostring "toString" t)) ...) will cause the
    53 toString to be a raw java call. see get-all-jar-classnames below for
    54 an example.
     78runs about three times faster than
     80    (time (dotimes (i 10000) (#"toString" "foo")))
     83    (with-constant-signature ((tostring "toString" t)) ...)
     85will cause the toString to be a raw java call. See
     86JSS::GET-ALL-JAR-CLASSNAMES for an example.
    5688Implementation is that the first time the function is called, the
    6395(jcmn class-name) lists the names of all methods for the class
     101The function ENSURE-COMPATIBILITY attempts to provide a compatibility
     102mode to existing users of JSS by importing the necessary symbols into
     105Some notes on other compatibilty issues:
     109   Since we are no longer using Beanshell, this is no longer present.
     110   For obtaining the current classloader use JAVA:*CLASSLOADER*.
  • trunk/abcl/contrib/jss/asdf-jar.lisp

    r13281 r13394  
    2525(defmethod perform ((operation load-op) (c jar-file))
    2626  (or jss:*inhibit-add-to-classpath*
    27       (jss::add-to-classpath (component-pathname c))))
     27      (jss:add-to-classpath (component-pathname c))))
    2929(defmethod operation-done-p ((operation load-op) (c jar-file))
    30   t
    31 #+nil
    3230  (or jss:*inhibit-add-to-classpath*
    3331      (member (namestring (truename (component-pathname c))) jss:*added-to-classpath* :test 'equal)))
  • trunk/abcl/contrib/jss/jss.asd

    r13360 r13394  
    44(defsystem :jss
    55  :author "Alan Ruttenberg, Mark Evenson"
    6   :version "2.0.1"
     6  :version "2.1.0"
    77  :components
    88  ((:module base :pathname "" :serial t
  • trunk/abcl/contrib/jss/packages.lisp

    r13363 r13394  
    1717   #:jcmn
    1818   #:japropos
     19   #:new
    2021;;; Useful utilities to convert common Java items to Lisp counterparts
    2728;;; deprecated
    28    #:new ; use JAVA:NEW
    2930   #:get-java-field ; use JAVA:JFIELD
Note: See TracChangeset for help on using the changeset viewer.