[Soot-list] JastAdd not recognizing @Override annotation

Guru Devanla gdevan2 at uic.edu
Thu Jul 4 08:10:31 EDT 2013


Hello All,

When I run soot to generate Jimple files for a simple class implementing an
interface I see exception listed below. For some reason, JastAdd does not
seem to like the "@Override" annotation over an interface method
implementation. I remember there was some change to @Override behavior from
1.5 to 1.6.

Any input would be of great help.

Here is the sample:

*public interface ParentInterface {*
*    public void parentinterface_method();*
*}*
*
*
*public class ParentClass implements ParentInterface {*
*    public void parentclass_method(){*
*    }*
*
*
*    @Override*
*    public void parentinterface_method() {*
*        //To change body of implemented methods use File | Settings | File
Templates.*
*    }*
*}*


Now, when I run soot to generate the Jimple files, I have this exception:
[line 15 here, the "@Override" statement]

*com/ser/statecarver/testartifacts/ParentClass.java:15:*
*  Semantic Error: method does not override a method from its superclass*
*ERROR soot.CompilationDeathException:*
*there were errors during parsing and/or type checking (JastAdd frontend)*
*        at soot.JastAddInitialResolver.formAst
(JastAddInitialResolver.java:63)*
*        at soot.JavaClassSource.resolve (JavaClassSource.java:54)*
*        at soot.SootResolver.bringToHierarchy (SootResolver.java:215)*
*        at soot.SootResolver.bringToSignatures (SootResolver.java:239)*
*        at soot.SootResolver.processResolveWorklist (SootResolver.java:154)
*
*        at soot.SootResolver.resolveClass (SootResolver.java:124)*
*        at soot.Scene.loadClass (Scene.java:448)*
*        at soot.Scene.loadClassAndSupport (Scene.java:433)*
*        at soot.Scene.loadNecessaryClass (Scene.java:1053)*
*        at soot.Scene.loadNecessaryClasses (Scene.java:1067)*
*        at soot.Main.run (Main.java:167)*
*        at soot.Main.main (Main.java:141)*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130704/b84c8218/attachment.html 


More information about the Soot-list mailing list