Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] IDT in JDK classes (How to enable java..* weaving?)

  I'm trying to add an marker interface to JDK classes... If I use:

    declare parents: * && !java.lang.Object implements myInterface;

then, java.* classes are not woven, which is OK for loadtime weaving but should be enabled for static weaving...(as we would like also to weave JDK classes).

Curiously, classes in javax, com.sun get woven... and also if I explicitely give the class name of a java.* class e.g.

declare parents: java.lang.String implements myInterface; // works !!!

Is there a way to force the weaver to weave java.* classes? I tried

declare parents: java..* && !java.lang.Object implements myInterface;

but does not work... (it simply ignores all classes in java and subpackages). I don't have any error message.

Curiously, if I use:

declare parents: java.lang.* && !java.lang.Object implements myInterface;

I obtain errors about annotations and enums, which means that the weaver is at least trying to weave.. [error] can't use declare parents to make annotation type
  java.lang.Override implemt an interface

Could anybody tell me how to disable this restriction? (e.g. using a correct declare parents expression, or on which class in the sources of aspectj I could look at, to make a patch that disables this restriction for compile time weaving..)

Many thanks,


Back to the top