Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] jdt access rules - for OSGi compiles

If you are using Aspects in an OSGi setting and your aspects will
touch classes outside of the bundle that they are declared in, then
you must use Equinox Aspects.  And you should also be using the
AJDT-PDE tooling available on the dev update site.

That being said, I do not think that access rules are available inside
of ajc.  (Also, I assume you mean that you want to check restrictions
at *compile-time* not run-time as you stated.)

Instead of using access rules, however, you could define declare
warning or declare error to do essentially the same work.

On Wed, Dec 9, 2009 at 12:29 PM, Ralf Sigmund <ralf.sigmund@xxxxxxxxx> wrote:
> Hello,
>
> we want to use the ajc Compiler in our Eclipse-Plugin Project.
> Right now I am trying to develop a maven-Tycho Plugin in order to
> compile with ajc instead of jdt.
>
> The AspectJ compiler appearantly does not understand the jdt access rules like:
>
> /home/rsi/.m2/repository/p2/osgi/bundle/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar[+org/aspectj/internal/lang/annotation/*:+org/aspectj/internal/lang/reflect/*:+org/aspectj/lang/*:+org/aspectj/lang/annotation/*:+org/aspectj/lang/internal/lang/*:+org/aspectj/lang/reflect/*:+org/aspectj/runtime/*:+org/aspectj/runtime/internal/*:+org/aspectj/runtime/internal/cflowstack/*:+org/aspectj/runtime/reflect/*:?**/*]
>  /home/rsi/.m2/repository/p2/osgi/bundle/com.google.collections.collect/1.0.0.rc2/com.google.collections.collect-1.0.0.rc2.jar[+com/google/common/base/*:+com/google/common/collect/*:?**/*]
>
> How could I still detect violation of access restrictions during
> runtime? How is this achieved in Eclipse? Do I need to compile twice
> (using jdt and ajc) ?
>
> Thanks for any hints.
> Best Regards Ralf
>
> --
> Ralf Sigmund
> Wohlwillstr. 35
> 20359 Hamburg
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top