Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Changing the class hierarchy

What constructors are defined in the OntClassImpl class?  In order for
the declare parents to succeed, it needs to modify super calls within
any ctors in the targetted class (OntClassImpl).  It does a number of
checks to verify what you want to introduce into the hierarchy is
allowed.  However, the ability to binary weave declare parents
'extends' is a recent addition to AspectJ (for a long time we only
supported extends if done with all source) - and it looks like you've
found a bug.  Is there any way you could do an all source compile and
see what error gets reported?

Andy.


On 07/10/05, Alessandro Di Bella <aldib@xxxxxxxxxx> wrote:
> Hi,
> I'm new to aspectj and I am trying to use an aspect to change hierarchy of a
> class.
> My aspect look like:
>
> public aspect JenaAdaptersHierarchyAspect {
>  declare parents : com.hp.hpl.jena.ontology.impl.OntClassImpl extends
> JenaClassAdapter;
> }
> and the pointcut is declared on a binary aspect.
> The jena jar is in the infpath end the classes involved are:
>
> public class JenaClassAdapter extends OntResourceImpl implements Resource {
>  public JenaClassAdapter( Node n, EnhGraph g ) {
>   super(n, g);
>  }
> }
>
> public interface Resource {
>  public String getURI();
> }
>
> and
> http://cvs.sourceforge.net/viewcvs.py/jena/jena2/src/com/hp/hpl/jena/ontology/impl/OntClassImpl.java?view=markup
>
> My problem is that when I try to instantiate the class (new
> OntClassImpl(null,null)) i get:
> java.lang.VerifyError: (class: com/hp/hpl/jena/ontology/impl/OntClassImpl,
> method: <init> signature:
> (Lcom/hp/hpl/jena/graph/Node;Lcom/hp/hpl/jena/enhanced/EnhGraph;)V) Call to
> wrong initialization method
>
> I tried recompiling the Jena jar using the same compiler of the weaver but no
> luck.
>
> I'm using ajdt downloaded from
> http://download.eclipse.org/technology/ajdt/31/dev/update.
>
> Any help would be greatly appreciated.
>
> Thanks in advance
>
> Alessandro
>
>
>
>
>
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


Back to the top