Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] RC1 coming soon?

Yes we skip declare annotation in @AspectJ. Here is why:

It must be possible to compile @AspectJ with only javac.
Assume we want to add @Foo on some constructor. Assume the @Foo
annotation has its target set to constructor (@Target(...))
To do that we would write something like:
@Aspect class Some {
   @Foo(someofmyvalueIwant)
   /// here I need a constructor
}

so we could then use a fake Some constructor like in:
@Aspect class Some {
   @DeclareAnnotation(....)
   @Foo(someofmyvalueIwant)
   Some() {}
}
but this is bad as aspect ' constructor is a non sense in the
assymetric AOP field.

instead we could use some nested class like
@Aspect class Some {

   static class SomeHost() {
      @DeclareAnnotation(....)
      @Foo(someofmyvalueIwant)
      SomeHost() { }
  }
}
but this is really weird to introduce so much new OO structures just
to add annotations in some places.

May be you have ideas for a better design that would still preserve
type safety that Java 5 brings to annotation (ie no
@DeclareAnnotation(annotation="string representation of @Foo you want
to introduce", target=" constructor pattern etc"))


As per the @DeclareParents it did not make it for M4 but it is now in
CVS and thus will be in RC1.

Alex



On 10/26/05, Alexandru Popescu <the.mindstorm.mailinglist@xxxxxxxxx> wrote:
> Alex can you please detail a little bit on the aboves:
>
> #: Alexandre Vasseur changed the world a bit at a time by saying on  10/26/2005 9:47 AM :#
> >
> > Olivier, I hope you noticed we changed some of the details for
> > @AspectJ mainly declare annotation for this style will not be
> > supported in 1.5.0,
>
> this means that AJ1.5 will not have support through annotation for doing declare @<kind>?
>
> and declare parent is looking slightly different.
>
> according to the doc the syntax @DeclareParents("TypePattern") is supported starting with M4. Is
> this wrong or are you saying that it will change till the final version?
>
>
> thanks in advance,
>
> ./alex
> --
> .w( the_mindstorm )p.
>
> > This will surface in the next published docs, but get it from the CVS
> > if you need to  fix your book. I am sure you will be willing to wait
> > some for up to date and accurate content for your book rather than
> > hurry up and ending up with both bugs in the shipment and features
> > deltas in your book.
> >
> > Alex
> >
> >
> > On 10/25/05, Oliver Böhm <boehm@xxxxxxxxxx> wrote:
> >> Hello,
> >>
> >> I guess the plan on http://www.eclipse.org/aspectj/plans.php is a
> >> little bit outdated (or I missed something;-) When I extrapolate the
> >> dates correct RC1 will come soon and we can count on the final version
> >> about midth of November. Is this realistic?
> >>
> >> I ask because first I want to finalize my book and secondly I manage
> >> the AspectJ Winter Camp at the beginning of December (8.-10., see
> >> http://www.jugs.org/ajwc/) where I want to use both: the book and
> >> AspectJ 5.
> >>
> >> regards
> >> Oliver
> >> --
> >> Oliver Böhm
> >> http://www.javatux.de
> >> _______________________________________________
> >> aspectj-dev mailing list
> >> aspectj-dev@xxxxxxxxxxx
> >> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
> >>
> > _______________________________________________
> > aspectj-dev mailing list
> > aspectj-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-dev
> >
>
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>


Back to the top