You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a java interface in Tai-e is represented as a JClass whose API isInterface() returns true.
However, for those "root" interfaces without a super interface (e.g. java.io.Serializable), its getSuperClass() returns java.lang.Object. May I ask if this is an intentional design (i.e. we use isInterface() && getSuperClass().getName() == "java.lang.Object" to check that a JClass is a "root" interface)?
Thanks,
🎯 Expected Behavior
For this kind of interface, getSuperClass() returns null.
Hi @BowenZhang-UST!
The behavior of Tai-e on getSuperClass() is designed by purpose, to support analyses for not only source code, but also JVM compatible bytecode programs.
According to JVMS:
For an interface, the value of the super_class ... must be a CONSTANT_Class_info structure representing the class Object. see here for more info.
According to JLS, although a root interface does not extendsObject:
Object is a supertype of any root interface, see here
All public methods declared in Object are also declared in every root interface, see here
📝 Overall Description
Currently a java interface in Tai-e is represented as a
JClass
whose APIisInterface()
returns true.However, for those "root" interfaces without a super interface (e.g.
java.io.Serializable
), itsgetSuperClass()
returnsjava.lang.Object
. May I ask if this is an intentional design (i.e. we useisInterface() && getSuperClass().getName() == "java.lang.Object"
to check that aJClass
is a "root" interface)?Thanks,
🎯 Expected Behavior
For this kind of interface,
getSuperClass()
returnsnull
.🐛 Current Behavior
getSuperClass()
actually returns JClassjava.lang.Object
.🔄 Reproducible Example
No response
⚙️ Tai-e Arguments
🔍 Click here to see Tai-e Options
{{The content of 'output/options.yml' file}}
🔍 Click here to see Tai-e Analysis Plan
{{The content of 'output/tai-e-plan.yml' file}}
📜 Tai-e Log
🔍 Click here to see Tai-e Log
ℹ️ Additional Information
No response
The text was updated successfully, but these errors were encountered: