New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java class specific print-object #48

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@alanruttenberg
Collaborator

alanruttenberg commented Jun 8, 2017

Specialize print-java-object-by-class to use java class-specific print method

(defmethod java::print-java-object-by-class ((class (eql ':|uk.ac.manchester.cs.owl.owlapi.concurrent.ConcurrentOWLOntologyImpl|)) obj stream)
(print 'hi)
(call-next-method))

I don't know why there are 4 commits here. Only the last one is what I tried to get.

alanruttenberg added some commits Apr 25, 2017

Signaling an simple error would signal another error if the message h…
…appened to have a ~ in it, since in simple cases there are no format args, but format is called with the message string. I searched for all cases in the source where there were calls to setFormatControl(x) followed by setFormatArguments(NIL). In such cases I changed setFormatControl(x) -> setFormatControl(x.replaceAll("~","~~")). An example that would trigger the double error was compiling (defun foo (x) ("This should be quoted ~a" x)).
Specialize print-java-object-by-class to use java class-specific prin…
…t method

(defmethod java::print-java-object-by-class ((class (eql ':|uk.ac.manchester.cs.owl.owlapi.concurrent.ConcurrentOWLOntologyImpl|)) obj stream)
	   (print 'hi)
         (call-next-method))
@Ferada

This comment has been minimized.

Show comment
Hide comment
@Ferada

Ferada Jun 8, 2017

Is there a better way to do this, the loop there looks slow if it's being called on any print on a pure Java object?

Ferada commented Jun 8, 2017

Is there a better way to do this, the loop there looks slow if it's being called on any print on a pure Java object?

easye pushed a commit that referenced this pull request Jun 8, 2017

mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Specialize print-java-object-by-class to use java class-specific prin…
…t method

(Alan Ruttenberg)

e.g.

    (defmethod java::print-java-object-by-class
        ((class (eql ':|uk.ac.manchester.cs.owl.owlapi.concurrent.ConcurrentOWLOntologyImpl|))
         obj stream)
      (print 'hi)
      (call-next-method))

From <437803a>.

Merges <#48>.
@easye

This comment has been minimized.

Show comment
Hide comment
@easye

easye Jun 8, 2017

Collaborator

Merged via 437803a

Collaborator

easye commented Jun 8, 2017

Merged via 437803a

@easye easye closed this Jun 8, 2017

svn2github pushed a commit to svn2github/abcl that referenced this pull request Jun 8, 2017

mevenson
Specialize print-java-object-by-class to use java class-specific prin…
…t method

(Alan Ruttenberg)

e.g.

    (defmethod java::print-java-object-by-class
        ((class (eql ':|uk.ac.manchester.cs.owl.owlapi.concurrent.ConcurrentOWLOntologyImpl|))
         obj stream)
      (print 'hi)
      (call-next-method))

From <armedbear/abcl@437803a>.

Merges <armedbear/abcl#48>.

git-svn-id: http://abcl.org/svn@15056 1c010e3e-69d0-11dd-93a8-456734b0d56f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment