Coder Social home page Coder Social logo

Comments (3)

apjanke avatar apjanke commented on July 19, 2024

Hmm. Maybe I'm wrong about Octave not getting interface implementation right:

>> str = javaObject('java.lang.String', 'foobar')
str =
<Java object: java.lang.String>

>> isa(str, 'java.lang.String')
ans = 1
>> isa(str, 'java.lang.Object')
ans = 1
>> isa(str, 'java.lang.CharSequence')
ans = 1
>>

Need to look into my own code more deeply. Maybe the interface structure has changed with the newer version of SLF4M or log4j.

from octave-slf4o.

apjanke avatar apjanke commented on July 19, 2024

Aha. Looks like it doesn't properly detect interfaces inherited from a superclass. I'm not crazy.

debug> jLogger
jLogger =
<Java object: org.slf4j.impl.Log4jLoggerAdapter>

debug> klass = jLogger.getClass;
debug> klass.getName
ans = org.slf4j.impl.Log4jLoggerAdapter
debug> superklass1 = klass.getSuperclass;
debug> superklass1.getName
ans = org.slf4j.helpers.MarkerIgnoringBase
debug> superklass2 = superklass1.getSuperclass;
debug> superklass2.getName
ans = org.slf4j.helpers.NamedLoggerBase
debug> ifcs2 = superklass2.getInterfaces;
debug> ifcs2(1).getName
ans = org.slf4j.Logger
debug> isa(jLogger, 'org.slf4j.Logger')
ans = 0
debug>

from octave-slf4o.

apjanke avatar apjanke commented on July 19, 2024

Bummer. This doesn't work either.

>> wantKlass = javaMethod('forName', 'java.lang.Class', 'org.slf4j.Logger')

error: [java] java.lang.ClassNotFoundException: org.slf4j.Logger 

from octave-slf4o.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.