Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is it on the cards for PCDs to be defined in terms of annotations?

Will there be a way to hook the same mechanism to e.g. xdoclet for Java <1.5 ? I would find this very useful.

cheers,


Jules


Adrian Colyer wrote:
Yes, this is in the plans. The next release of AspectJ (after 1.2) is focused around support for Java 1.5, including annotations. We will supported pointcut expressions that match based on annotations, and also a 'declare annotation' construct so that when people go mad and start sprinkling annotations left, right, and centre you can still modularize them using AspectJ.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



"Dan Haywood" <dan@xxxxxxxxxxxxxxxxxxxxxxxx> Sent by: aspectj-users-admin@xxxxxxxxxxx
12/05/2004 09:16
Please respond to
aspectj-users


To
<aspectj-users@xxxxxxxxxxx>
cc

Subject
[aspectj-users] Is it on the cards for PCDs to be defined in terms of annotations?






Been following the discussion on external definition of PCDs with interest.
I'd like to ask the reciprocal question:

Suppose we have a POJO model over which we want to apply some aspects (eg
persistence, security, visualization).  I don't want to use naming
conventions to identify the features to be persisted, visualized etc., and I
don't want to have the "binding" of the aspects to the model externalized;
rather I'd like to annotate the model directly using JSR 175 annotations:

So, for example, I might have:

@Persistent
public class CustomerPojo {

  @Visualize
  private String firstName;

  @Visualize
  private String lastName;

  @Transactional
  public void setLastName(final String lastName) {
    this.lastName = lastName;
  }

  // and so on...
}

We then would want a pointcut defined in terms of these annotations.  I
guess it would be something like:

public aspect PersistenceAspect {

public pointcut persistentClasses(): within(@Persistent); // or something
like
  // and so on...

}

public aspect VisualizeAspect {

public pointcut visualizedFeatures(): get(@Visualize); // you get the
idea
  // and so on...

}

As a relative newbie to AspectJ, I was wondering if this has been discussed
and is it in the plans?  Hopefully "yes" to both.

Cheers
Dan


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


--
/**********************************
 * Jules Gosnell
 * Partner
 * Core Developers Network (Europe)
 *
 *    www.coredevelopers.net
 *
 * Open Source Training & Support.
 **********************************/



Back to the top