Re: [aspectj-users] AspectJ 1.9.21.1 maintenance release

2024-02-14 Thread Matthew Adams via aspectj-users
Again, great work, folks!  On Tue, Feb 13, 2024 at 9:18 PM Alexander Kriegisch via aspectj-users < aspectj-users@eclipse.org> wrote: > Dear AspectJ users, > > we are pleased to announce the AspectJ bugfix release 1.9.21.1 supporting > Java 21. Please note that since 1.9.19, the minor-minor

[aspectj-users] AOP features directly in Kotlin language -- request for upvotes

2023-02-03 Thread Matthew Adams
Hi all, I’ve gone ahead and requested direct AOP support in the Kotlin language itself. Please go upvote. https://youtrack.jetbrains.com/issue/KT-43476/Provide-aspect-aware-kotlin-compiler-similar-to-AspectJs-ajc

Re: [aspectj-users] [aspectj-dev] AspectJ 1.9.7 released

2021-06-30 Thread Matthew Adams
Awesome! Great work, Andy & Alexander! I'm looking forward to perusing the new layout. Now, if we can **just** get AspectKotlin going...  > On Jun 28, 2021, at 4:00 PM, Andy Clement wrote: > > Hi everyone, > > I'm pleased to announce AspectJ 1.9.7 is released. > > To read more about the

Re: [aspectj-users] AspectJ + AJDT + AspectJ Maven development versions for Java 16 available

2021-04-28 Thread Matthew Adams
Awesome. I'm also a long-time AspectJ user and occasional supporter (I'm a former SpringSource consultant from way back 2007-2008 and founding co-committer of Spring Data Cassandra). I've been working primarily in the Node.js space for the last 7+ years, but have been keeping a little bit of

[aspectj-users] Please upvote compile-time weaving in kotlin

2020-11-19 Thread Matthew Adams
Hey all, Please go upvote https://youtrack.jetbrains.com/issue/KT-43476 if you'd like to see compile-time support in kotlin. -matthew ___ aspectj-users mailing list aspectj-users@eclipse.org To unsubscribe from this list, visit

Re: [aspectj-users] Survey - Relevance of Open Source Research

2019-12-03 Thread Matthew Adams
Ok, enough's enough. This is looking more & more like spam. Quit already, please. > On Dec 2, 2019, at 5:35 PM, Michelangelo Machado > wrote: > > Dear all, > > We are conducting a Survey about the Relevance of Open Source Research. This > Survey is part of my bachelor's monograph in

Re: [aspectj-users] Where is AJDT release build for eclipse 2019-06/4.12?

2019-09-17 Thread Matthew Adams
> :) But it may just be the metadata in the marketplace entry - have you >>> tried just using the AJDT build from the dev update site? >>> http://download.eclipse.org/tools/ajdt/410/dev/update ? (I know it says 410 >>> but I think its what we use in STS builds on late

Re: [aspectj-users] Where is AJDT release build for eclipse 2019-06/4.12?

2019-09-16 Thread Matthew Adams
e site? > http://download.eclipse.org/tools/ajdt/410/dev/update > <http://download.eclipse.org/tools/ajdt/410/dev/update> ? (I know it says 410 > but I think its what we use in STS builds on later eclipses) > > cheers, > Andy > > On Fri, 13 Sep 2019 at 14:12, Matthew Adams <

[aspectj-users] Where is AJDT release build for eclipse 2019-06/4.12?

2019-09-13 Thread Matthew Adams
Hi all, Just wondering if AJDT releases are keeping up with eclipse releases. I'm using 2019-06 (4.12) with Xtext, and need AspectJ, but the one on the eclipse Marketplace (https://marketplace.eclipse.org/content/aspectj-development-tools

Re: [aspectj-users] Anyway to use AJ to _prevent_ field assignment at initialization of an object?

2019-08-08 Thread Matthew Adams
Advise the call to the constructor of DefaultCacheResolverFactory with around advice, catch the exception, then return what you want to. Note: don't use an "execution" pointcut expression -- you want a "call". > On Aug 8, 2019, at 9:20 AM, Eric B wrote: > > I'm using the JCache API, in which

Re: [aspectj-users] Formal support for Kotlin?

2019-05-14 Thread Matthew Adams
ompile time. > > cheers, > Andy > > On Tue, 14 May 2019 at 06:46, Matthew Adams <mailto:matt...@matthewadams.me>> wrote: > No, Martin, I’m not experiencing these problems, and my mentioning Spring was > tangential. > > I’m basically asking that ajc support Ko

Re: [aspectj-users] Formal support for Kotlin?

2019-05-14 Thread Matthew Adams
vert @DeclareParents to a form in > which Village is a subclass of whatever interface implementation you define > in your aspect, for example something like this: > stackoverflow.com <http://stackoverflow.com/> > > From: aspectj-users-boun...@eclipse.org > on behalf of Matthew Adam

[aspectj-users] Formal support for Kotlin?

2019-05-13 Thread Matthew Adams
Hi all, I’ve been doing some googling around to see what I can find with regard to using AspectJ with Kotlin. Things don’t look particularly great at first glance: https://stackoverflow.com/questions/44364633/aspectj-doesnt-work-with-kotlin

[aspectj-users] [ANNOUNCE] aspect.js & mutrait for JavaScript on Node.js

2018-11-15 Thread Matthew Adams
NB: this is a shameless plug, but likely very relevant to this audience. Hey all, I'm a former SpringSource consultant, having used & influenced AspectJ for years. I really can't see doing any kind of OOP-based development without AOP to complement it. For the last several years, I've been

Re: [aspectj-users] AspectJ 1.9.0 released

2018-04-06 Thread Matthew Adams
 On Mon, Apr 2, 2018 at 2:55 PM, Andy Clement wrote: > AspectJ 1.9.0 is finally released, after multiple betas and release > candidates. The README can be found here: > https://eclipse.org/aspectj/doc/released/README-190.html - thanks to > everyone in the community

Re: [aspectj-users] Question on unusual use of AOP

2016-10-04 Thread Matthew Adams
Sounds totally doable. Pointcuts would definitely be the way I'd use. You just need to consider how to apply the pointcuts: at compile time or runtime. If you do it at compile time, then just vary which aspect libraries are on the aspect path. If you do it at runtime, you'll have to use

Re: [aspectj-users] true false literals in type expressions?

2013-10-09 Thread Matthew Adams
On 8 October 2013 11:55, Matthew Adams matt...@matthewadams.me wrote: Is there a type expression meaning true or false? What I'd like is to be able to use the primitive literal values true false in a type expression. I'd like to replace the use of Bool in the example below with the literals

Re: [aspectj-users] true false literals in type expressions?

2013-10-09 Thread Matthew Adams
* increase the size of the work. Andy On 9 October 2013 14:40, Matthew Adams matt...@matthewadams.me wrote: That's correct: if() is disallowed in DE/DW. Further, though, the form if(true) seem nonintuitive; is there room also for simply true false? On Wed, Oct 9, 2013 at 1:59 AM, Andy Clement

[aspectj-users] true false literals in type expressions?

2013-10-08 Thread Matthew Adams
Is there a type expression meaning true or false? What I'd like is to be able to use the primitive literal values true false in a type expression. I'd like to replace the use of Bool in the example below with the literals. public final aspect Bool { public static final pointcut true_():

[aspectj-users] import static for pointcuts?

2013-10-08 Thread Matthew Adams
It looks like static pointcuts cannot be imported statically. True? package app.util; public final aspect Bool { public static final pointcut true_(): within(*); public static final pointcut false_(): !true_(); } = package app.scratch; import static app.util.Bool.true_; // :(

[aspectj-users] Pointcut question to simply subaspects

2013-10-07 Thread Matthew Adams
If I have a pointcut like the following: public aspect TypeSpecificAspect { public pointcut accessingTarget(): call(Person+.new(..)) || call(* Person+.*(..)) || get(* Person+.*) || set(* Person+.*); } I'd like to push the pointcut up into a superaspect so that all the subaspect would have

Re: [aspectj-users] Pointcut question to simply subaspects

2013-10-07 Thread Matthew Adams
can't recall the extent to which type variables are allowed in pointcuts. Andy On 7 October 2013 22:56, Matthew Adams matt...@matthewadams.me wrote: If I have a pointcut like the following: public aspect TypeSpecificAspect { public pointcut accessingTarget(): call(Person+.new

Re: [aspectj-users] inter type declaration

2013-09-20 Thread Matthew Adams
Don't forget that the field is public in class A... On Fri, Sep 20, 2013 at 12:42 PM, Jozsef Hegedus jhegedu...@gmail.comwrote: On 20.9.2013 20.39, Andy Clement wrote: 1) I have a java class A with has no fields class A { } 2) I use an aspect to introduce a field called f into A

Re: [aspectj-users] AspectJ 1.8.0.M1 now available !

2013-07-29 Thread Matthew Adams
Wow. Congrats, Andy. Nice work. I hope to play as soon as I can. :) -matthew On Mon, Jul 29, 2013 at 7:24 PM, Andy Clement andrew.clem...@gmail.comwrote: Hi, I'm pleased to announce (much sooner than I anticipated) AspectJ 1.8.0.M1. Typically with an AspectJ major release the first

Re: [aspectj-users] Trait syntax sugar?

2013-06-18 Thread Matthew Adams
FYI, there's an interesting discussion going on right now over on groovy-user about traits. http://groovy.329449.n5.nabble.com/Adding-Trait-to-Groovy-tt5715831.html#none -matthew -- View this message in context: http://aspectj.2085585.n4.nabble.com/Trait-syntax-sugar-tp4650566p4650981.html

Re: [aspectj-users] Replace void with return this

2013-06-10 Thread Matthew Adams
I'm not sure. What is your use case? Andy On 4 June 2013 09:10, Matthew Adams matt...@matthewadams.me wrote: Can AspectJ replace void return types with 'return this' capability? Basically, for any class T, change void doStuff() {} to T doStuff() { return this; } This has been requested

Re: [aspectj-users] Replace void with return this

2013-06-06 Thread Matthew Adams
use case? Andy On 4 June 2013 09:10, Matthew Adams matt...@matthewadams.me wrote: Can AspectJ replace void return types with 'return this' capability? Basically, for any class T, change void doStuff() {} to T doStuff() { return this; } This has been requested over in pure java land

[aspectj-users] Replace void with return this

2013-06-04 Thread Matthew Adams
Can AspectJ replace void return types with 'return this' capability? Basically, for any class T, change void doStuff() {} to T doStuff() { return this; } This has been requested over in pure java land and got deferred. -Matthew Sent from my iPhone ___

Re: [aspectj-users] 1.7.3: when?

2013-05-31 Thread Matthew Adams
: I have no fixed schedule in mind for it but usually I'd wait until there are a few more fixes in the pipeline before going through the release process. In other news I have started with some AspectJ ground work for handling Java8. cheers, Andy On 28 May 2013 14:13, Matthew Adams matt

[aspectj-users] 1.7.3: when?

2013-05-28 Thread Matthew Adams
...just wondering when 1.7.3 will go GA. Andy? -matthew -- mailto:matt...@matthewadams.me matt...@matthewadams.me skype:matthewadams12 googletalk:matt...@matthewadams.me http://matthewadams.me http://www.linkedin.com/in/matthewadams ___ aspectj-users

Re: [aspectj-users] Type expression matching annotation values: String matching, numeric ranges, etc?

2013-04-26 Thread Matthew Adams
in the array of values =*? (...) contains any: matches a MVAV where ... is an unordered set of values =*! (...) contains all: matches a MVAV where ... is an unordered set of values WDYT? cheers, Andy On 25 April 2013 20:08, Matthew Adams matt...@matthewadams.me wrote: So as I've been kicking

Re: [aspectj-users] Type expression matching annotation values: String matching, numeric ranges, etc?

2013-04-26 Thread Matthew Adams
. I'm still waiting for someone to tell me the best operator for that 'member of array' construct we were talking about previously: @Foo({1,2,3}) declare @type: @Foo(value 1): @ContainsOne; cheers, Andy On 25 April 2013 20:08, Matthew Adams matt...@matthewadams.me wrote: So as I've

Re: [aspectj-users] Type expression matching annotation values: String matching, numeric ranges, etc?

2013-04-26 Thread Matthew Adams
On Fri, Apr 26, 2013 at 11:54 AM, Archie Cobbs arc...@dellroad.org wrote: On Fri, Apr 26, 2013 at 11:31 AM, Matthew Adams matt...@matthewadams.mewrote: While the Java familiarity afforded by (a) is appealing, the verbosity is a turn-off for me. AspectJ pointcuts already are very terse

Re: [aspectj-users] Type expression matching annotation values: String matching, numeric ranges, etc?

2013-04-26 Thread Matthew Adams
Andy Clement wrote Most cycles are going to get consumed on supporting Java 8 for the next little while. [Stirring the pot here] Does JDK 8's delay (see http://mail.openjdk.java.net/pipermail/jdk8-dev/2013-April/002336.html) free up time and/or resources to implement this stuff? -matthew

Re: [aspectj-users] Matching on one of an annotation's values in a multivalued property?

2013-04-25 Thread Matthew Adams
For the record, after typing out loud in https://bugs.eclipse.org/bugs/show_bug.cgi?id=405016, I've officially flip-flopped and agree with Alexander Romain. Operator = should not be overloaded. It should only be used with single-valued attributes. Curly brackets should be used with multivalued

Re: [aspectj-users] Annotation Values in Matching Expressions

2013-04-22 Thread Matthew Adams
The polymorphism is not something I need right now -- only the contains list semantics. I'd be satisfied if 1.7.3 shipped with that and left the polymorphism for later. -- View this message in context:

Re: [aspectj-users] Annotation Values in Matching Expressions

2013-04-13 Thread Matthew Adams
That's an enhancement. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=405016. On Fri, Apr 12, 2013 at 6:43 PM, Jay Roberts puda...@gmail.com wrote: Hi, I'd like to be able to do something like: @Around(execution(@javax.ws.rs.Consumes({MediaType.MULTIPART_FORM_DATA}) * *.*(..)))

Re: [aspectj-users] Class with inner aspect?

2013-04-11 Thread Matthew Adams
Hmmm. Upon further inspection, it looks like I still have a problem here. Created repro-able test case issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=405403 -- View this message in context: http://aspectj.2085585.n4.nabble.com/Class-with-inner-aspect-tp4650850p4650854.html Sent from

Re: [aspectj-users] Class with inner aspect?

2013-04-10 Thread Matthew Adams
for the noise! On Wed, Apr 10, 2013 at 10:26 AM, Andy Clement andrew.clem...@gmail.comwrote: I'm not aware of any bugs with inner aspects, how does it not work for you? Andy On 9 April 2013 08:52, Matthew Adams matt...@matthewadams.me wrote: I'd like to be able to create a POJO entity and declare

[aspectj-users] Class with inner aspect?

2013-04-09 Thread Matthew Adams
I'd like to be able to create a POJO entity and declare an inner aspect. For example: @Entity // introduced via ITD public class User { @Id // introduced via ITD Long id; // introduced via ITD String username; // introduced via ITD public static aspect Mapping { declare @field:

[aspectj-users] Matching on one of an annotation's values in a multivalued property?

2013-04-05 Thread Matthew Adams
/NB: contrived example; pay attention to form, not substance here, please./ Consider this annotation: Consider this annotated class: How do I craft a type expression that means any class where the value property of its @Gimme annotation contains Serializable.class? I tried but that didn't

Re: [aspectj-users] Matching on one of an annotation's values in a multivalued property?

2013-04-05 Thread Matthew Adams
Dunno. I used Nabble's raw tags. I'll reply to original post without them. -- View this message in context: http://aspectj.2085585.n4.nabble.com/Matching-on-one-of-an-annotation-s-values-in-a-multivalued-property-tp4650839p4650841.html Sent from the AspectJ - users mailing list archive at

Re: [aspectj-users] Matching on one of an annotation's values in a multivalued property?

2013-04-05 Thread Matthew Adams
Hmmm. While I see your point, it does fit the mold when you consider that multivalued annotation properties still accept a single-valued notation in Java itself. The form @Gimme(Serializable.class) is equivalent to @Gimme({Serializable.class}). I suppose that I'm a bit more pragmatic about it,

Re: [aspectj-users] Trait syntax sugar?

2013-04-05 Thread Matthew Adams
Entered issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=405043 for tracking this. -- View this message in context: http://aspectj.2085585.n4.nabble.com/Trait-syntax-sugar-tp4650566p4650847.html Sent from the AspectJ - users mailing list archive at Nabble.com.

Re: [aspectj-users] AbstractMethodError calling method defined on class receiving ITD of same method

2013-04-02 Thread Matthew Adams
Hey, Andy, what did you decide to do with this scenario? Will this just remain a StupidUserError, or will a future version of the compiler emit an error? FWIW, I definitely favor the latter. I readily espouse the virtue of laziness http://c2.com/cgi/wiki?LazinessImpatienceHubris , and the

Re: [aspectj-users] AbstractMethodError calling method defined on class receiving ITD of same method

2013-04-01 Thread Matthew Adams
On Mon, Apr 1, 2013 at 10:13 AM, Andy Clement andrew.clem...@gmail.comwrote: Hmmm, I had to fix up some of your sample code there as it doesn't actually work as it is. (Is Go an annotation or an aspect - you've used it as both...) Sorry for the Go confusion. I was giving the shape of the

Re: [aspectj-users] AbstractMethodError calling method defined on class receiving ITD of same method

2013-04-01 Thread Matthew Adams
:29 AM, Matthew Adams matt...@matthewadams.mewrote: On Mon, Apr 1, 2013 at 10:13 AM, Andy Clement andrew.clem...@gmail.comwrote: Hmmm, I had to fix up some of your sample code there as it doesn't actually work as it is. (Is Go an annotation or an aspect - you've used it as both...) Sorry

[aspectj-users] AbstractMethodError calling method defined on class receiving ITD of same method

2013-03-28 Thread Matthew Adams
Hi all, I want to make sure I haven't misunderstood AspectJ's treatment of the following scenario, as I'm getting an AbstractMethodError in 1.7.2. Conceptual code example follows. @Go public class Foo { public void go() { System.out.println(go); } } = public aspect Go { public interface

[aspectj-users] Overweaving option in aspectj-maven-plugin?

2013-02-28 Thread Matthew Adams
Hi all, How do you set the overWeaving option (-Xset:overWeaving=true) in the aspectj-maven-plugin (v. 1.4-SNAPSHOT)? I tried Xset:overWeavingtrue/Xset:overWeaving (and XSet...) but the eclipse editor complained about the unbound namespace and it seemed not to have an effect (nothing mentioning

Re: [aspectj-users] Overweaving option in aspectj-maven-plugin?

2013-02-28 Thread Matthew Adams
maintaining that plugin right now. Andy On 28 February 2013 07:05, Matthew Adams matt...@matthewadams.me wrote: Hi all, How do you set the overWeaving option (-Xset:overWeaving=true) in the aspectj-maven-plugin (v. 1.4-SNAPSHOT)? I tried Xset:overWeavingtrue/Xset:overWeaving (and XSet

Re: [aspectj-users] using static fields in an advice

2013-02-12 Thread Matthew Adams
Off of the top of my head, I see two quick ways to do this. 1. Reflection. The advice could use reflection to find a field of type Logger and invoke its info method. 2. Introduction. Use an ITD to introduce a Logger known to your advice into the class along with methods to control the logging.

Re: [aspectj-users] Trait syntax sugar?

2012-10-08 Thread Matthew Adams
05.10.2012 um 16:56 schrieb Matthew Adams matt...@matthewadams.me: I've used a common ITD pattern for years now to introduce interface implementation(s) into existing classes when I have well-encapsulated, orthogonal state behavior that I want to introduce. Here's a simple example (hand

[aspectj-users] Trait syntax sugar?

2012-10-05 Thread Matthew Adams
Hi all, I've used a common ITD pattern for years now to introduce interface implementation(s) into existing classes when I have well-encapsulated, orthogonal state behavior that I want to introduce. Here's a simple example (hand-written, but gives you the gist): suppose several of my domain

Re: [aspectj-users] Inconsistent classfile encountered: The undefined type parameter BLAH is referenced from within Blah

2012-09-17 Thread Matthew Adams
projects - that may have given rise to what you are seeing now. For the AJDT issues, please raise those too. Andy On 13 September 2012 15:06, Matthew Adams matt...@matthewadams.me wrote: I'm using 1.7.1 and am seeing the same problem as https://bugs.eclipse.org/bugs/show_bug.cgi?id

Re: [aspectj-users] Inconsistent classfile encountered: The undefined type parameter BLAH is referenced from within Blah

2012-09-17 Thread Matthew Adams
Bug submitted: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389750 On Mon, Sep 17, 2012 at 1:10 PM, Matthew Adams matt...@matthewadams.mewrote: You need to checkout the repo at commit 368b7dc827ef0237bdb6d460320cf1e7fbedf7da -- that's the commit that has the broken code in it. Also, I

Re: [aspectj-users] type pattern not matching when annotation values are enum instances (or psf Strings)

2012-09-17 Thread Matthew Adams
a bug, but it sounds like your inconsistent class file thing is more pressing. cheers, Andy On 13 September 2012 14:35, Matthew Adams matt...@matthewadams.me wrote: Consider the following annotation: @Target(TYPE) @Retention(RUNTIME) public @interface Persistable

Re: [aspectj-users] type pattern not matching when annotation values are enum instances (or psf Strings)

2012-09-17 Thread Matthew Adams
Bug reported: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389752 On Mon, Sep 17, 2012 at 1:31 PM, Matthew Adams matt...@matthewadams.mewrote: If you get my bitbucket repo at HEAD and try changing the 'declare parents' lines in PersistableJpaAspect and/or PersistableMongoAspect to use

[aspectj-users] type pattern not matching when annotation values are enum instances (or psf Strings)

2012-09-13 Thread Matthew Adams
Consider the following annotation: @Target(TYPE) @Retention(RUNTIME) public @interface Persistable { StoreType in() default StoreType.MONGO; IdType id() default IdType.STRING; } I'm attempting to match a type pattern in a declare parents based on the id() property of the

[aspectj-users] Inconsistent classfile encountered: The undefined type parameter BLAH is referenced from within Blah

2012-09-13 Thread Matthew Adams
I'm using 1.7.1 and am seeing the same problem as https://bugs.eclipse.org/bugs/show_bug.cgi?id=242797 Andy, I've invited you to my private BitBucket git repo where this is happening if you'd like to see for yourself. Further, I'm seeing a fair number of AJDT errors in STS 3.0.0.RELEASE as well.

Re: [aspectj-users] AspectJ 1.7.1 released

2012-09-12 Thread Matthew Adams
Any idea when 1.7.1 will show in Maven Central? I checked via search.maven.org and it doesn't show up and my builds break without the repository maven.springframework.org in it... -matthew -- View this message in context:

Re: [aspectj-users] Method constructor validation pointcuts

2012-09-12 Thread Matthew Adams
Ok, I need another pair of eyeballs again. I'm refining my earlier pointcuts one baby step at a time. Now, instead of restricting validation annotations to javax.validation.constraints..*, I want to allow for any @Constraint annotation, which really means any annotation annotated with

Re: [aspectj-users] Method constructor validation pointcuts

2012-09-12 Thread Matthew Adams
Progress update: I just noticed that if I use an annotation that is **not** defined in the same project as the aspect and test class, like org.apache.bval.constraints.NotEmpty instead of my own, the meta-annotation pointcut successfully matches, so it must be something about my maven ajc compiler

Re: [aspectj-users] Method constructor validation pointcuts

2012-09-12 Thread Matthew Adams
Multiple @s might be nice for finite levels of meta-annotations, but perhaps you could reuse the + operator since it's kind of inheritance-y. How about: @Foo @(@Foo *) same as @@Foo? @(@(@Foo *)) same as @@@Foo? ... @+Foo same as @(@(@(...(@Foo *? WDYT? Sent from my iPhone On Sep 12,

Re: [aspectj-users] Method constructor validation pointcuts

2012-09-11 Thread Matthew Adams
and not type annotations. does that help? cheers, Andy On 10 September 2012 12:17, Matthew Adams matt...@matthewadams.me wrote: Hi all, I'm trying to use a JSR-303 ValidationProvider (Apache BVal, to be exact) along with an aspect to do POJO method constructor validation. I'd like

[aspectj-users] declare error hasmethod

2012-09-11 Thread Matthew Adams
In light of the fact that bean validation still doesn't support static methods, I'd like to add a declare error statement that makes it a compiler error to try to do that. I'm doing something wrong here. The following fails to compile: /* 95 */declare error : /* 96 */

[aspectj-users] Method constructor validation pointcuts

2012-09-10 Thread Matthew Adams
Hi all, I'm trying to use a JSR-303 ValidationProvider (Apache BVal, to be exact) along with an aspect to do POJO method constructor validation. I'd like to apply before advice to validated constructors methods, and after advice to validated return values, where validated means the following.

Re: [aspectj-users] Multiple annotations using single declare @type?

2012-09-05 Thread Matthew Adams
the multiple annos on declare @type though. Mind you, it is even more work to implement that than to implement the enhancement for declare @type ! Oh, n! :P cheers, Andy On 29 August 2012 20:43, Matthew Adams matt...@matthewadams.me wrote: Hey, you know, I was thinking that if I

Re: [aspectj-users] Multiple annotations using single declare @type?

2012-08-29 Thread Matthew Adams
as I'd hoped. A lot of infrastructure is just dealing with one annotation per declare anno statement. cheers, Andy On 16 August 2012 07:13, Matthew Adams matt...@matthewadams.me wrote: Hi all, I recall this was a question a couple of years ago. Can you now use a single declare @type

Re: [aspectj-users] Multiple annotations using single declare @type?

2012-08-18 Thread Matthew Adams
... itd fields on interfaces now preserve names, the 8 year old issue ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=73507 ). A 5 digit bugzilla number, that's how old it is. Andy On 17 August 2012 10:46, Matthew Adams matt...@matthewadams.me wrote: Oh, yeah. I knew it was out there... On Thu

Re: [aspectj-users] Multiple annotations using single declare @type?

2012-08-17 Thread Matthew Adams
isn't as trivial as I'd hoped. A lot of infrastructure is just dealing with one annotation per declare anno statement. cheers, Andy On 16 August 2012 07:13, Matthew Adams matt...@matthewadams.me wrote: Hi all, I recall this was a question a couple of years ago. Can you now use

Re: [aspectj-users] Just for fun: declare error to prevent use of inheritance?

2012-08-17 Thread Matthew Adams
, 2012 at 12:45 PM, Matthew Adams matt...@matthewadams.me wrote: Interesting. I like all of the suggestions. I entered an issue to track this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387499 Thanks! On Thu, Aug 16, 2012 at 3:05 PM, Andy Clement andrew.clem...@gmail.com wrote: I

Re: [aspectj-users] Just for fun: declare error to prevent use of inheritance?

2012-08-17 Thread Matthew Adams
A bit terser, now: public aspect Extend { public static class Nothing {} declare parents : !Enum+ !Annotation+ whatever..* // classes to restrict extends Nothing; } :) On Fri, Aug 17, 2012 at 3:33 PM, Matthew Adams matt...@matthewadams.me wrote: ...and here you go

[aspectj-users] Multiple annotations using single declare @type?

2012-08-16 Thread Matthew Adams
Hi all, I recall this was a question a couple of years ago. Can you now use a single declare @type statement to introduce several annotations at once? That way, instead of: declare @type : org.example.foo.Bar+ : @Goo; declare @type : org.example.foo.Bar+ : @Hoo; you could write: declare

[aspectj-users] Just for fun: declare error to prevent use of inheritance?

2012-08-16 Thread Matthew Adams
Just for fun, I was trying to think of how to use declare error to prevent the use of class inheritance in user code, but I can't think of how to do that. Basically, if you wanted to disallow the declaration of classes that extend anything other than Object, is there a declare error form that

[aspectj-users] JSR-303 method validation of **POJOs**?

2012-08-07 Thread Matthew Adams
Hi all, FYI, I just posted a question at http://forum.springsource.org/showthread.php?129092-JSR-303-method-validation-of-**POJOs** asking about built-in Spring support for JSR-303-style method-level validation. Thought folks here might know or at least be interested, since there is at least one

Re: [aspectj-users] Pointcut for where any parameters are annotated by?

2012-02-13 Thread Matthew Adams
think we have something like that. cheers, Andy On 12 February 2012 09:03, Matthew Adams matt...@matthewadams.me wrote: Hi all, Just wondering if there's a way to express a pointcut meaning any method with any parameters annotated with @javax.validation.constraint.*. For example

[aspectj-users] Pointcut for where any parameters are annotated by?

2012-02-12 Thread Matthew Adams
Hi all, Just wondering if there's a way to express a pointcut meaning any method with any parameters annotated with @javax.validation.constraint.*. For example, these would match: public void m1(@Foo in x, int y) ... public void m2(int x, @Foo int y) ... public void m3(@Foo int x, @Foo int y,

Re: [aspectj-users] Type patterns values of annotation properties?

2011-09-16 Thread Matthew Adams
Cool. Thanks! On Thu, Sep 8, 2011 at 10:50 AM, Andy Clement andrew.clem...@gmail.comwrote: On 6 September 2011 14:20, Matthew Adams matt...@matthewadams.me wrote: Ok, cool. I'll enter an enhancement request for ! notation. It seems like that would apply universally. I've just committed

[aspectj-users] Type patterns values of annotation properties?

2011-09-06 Thread Matthew Adams
Can type patterns match on values of properties of annotations? For example, given this ITD classes: declare parents: (@Foo(clazz=Number+) *) implements FooableInteger; @Foo(clazz=Long.class) public class Thingy {} @Foo(clazz=String.class) public class Stringy {} Can I write a type

Re: [aspectj-users] Type patterns values of annotation properties?

2011-09-06 Thread Matthew Adams
!=Long.class) *: @Bar; but we don't right now. cheers Andy On 6 September 2011 12:47, Matthew Adams matt...@matthewadams.me wrote: For example, given this ITD classes: declare parents:  (@Foo(clazz=Number+) *)  implements FooableInteger; @Foo(clazz=Long.class) public class Thingy

Re: [aspectj-users] policy enforcement for parameterless constructor and certain field declaration

2011-05-25 Thread Matthew Adams
For the first one, you might try using declare error with a type pattern that uses hasmember. Not sure what you mean by the second, but declare error with hasmember might do the trick there, too. -matthew On Sat, May 21, 2011 at 5:57 PM, Kristof Jozsa kristof.jo...@gmail.com wrote: I'd like to

Re: [aspectj-users] Field name mangling when introducing into inner interface?

2011-05-11 Thread Matthew Adams
On Mon, May 9, 2011 at 1:57 PM, Andy Clement andrew.clem...@gmail.com wrote: As of 1.6.9, name mangling was supposed to go away.  Is it still present when introducing fields into interfaces in the manner described above?  I'm using 1.6.11 still seeing name mangling, making persistence setup

[aspectj-users] Field name mangling when introducing into inner interface?

2011-05-09 Thread Matthew Adams
Hi all, I've been using a certain pattern to introduce implementations of an interface into persistent classes I want to implement the interface. Here's the basic pattern: * define a POJI (plain, old Java interface), * define an annotation that is used to drive type-pattern matching * define an

[aspectj-users] Problem dusting off old AspectJ project: abstract aspect fields not visible in subaspects?

2011-05-05 Thread Matthew Adams
Hi all, I'm blowing the dust off of an old AspectJ-based project I had been working on, and I'm getting an error that I can't quite figure out. I have an abstract aspect that is introducing two Date fields. Various subaspects (4 of them) are attempting to access the field, but the compiler is

Re: [aspectj-users] New feature of Aspectj 1.6.11

2010-12-14 Thread Matthew Adams
I might suggest moving the + or - sign inside the annotation to indicate the addition or removal of the annotation's member: declare @field: int aField: @Foo(+i=5) That way, you can add and remove annotation members all in one shot: declare @field: int aField: +...@bar(-i=5,+goo=messy) etc.

Re: [aspectj-users] New feature of Aspectj 1.6.11

2010-12-14 Thread Matthew Adams
/ Best regards JL Pasturel -- *De :* aspectj-users-boun...@eclipse.org [mailto: aspectj-users-boun...@eclipse.org] *De la part de* Matthew Adams *Envoyé :* mardi 14 décembre 2010 16:16 *À :* aspectj-users@eclipse.org *Objet :* Re: [aspectj-users] New feature

Re: [aspectj-users] Annotation Pointcut

2010-09-01 Thread Matthew Adams
My guess is your method expression of * *(*), which means any method with any return type that takes exactly one parameter of any type. If you really mean any method, regardless of the number of arguments types, then you'd want * *(..), which would make your pointcut:

Re: [aspectj-users] Pointcut around constructor

2010-06-30 Thread Matthew Adams
For your example, you actually want the around advice to return something -- your Calc instance. The reason around advice requires a return type is that you can place around advice around any method without the client necessarily knowing that around advice is being executed. If the client

Re: Re : [aspectj-users] Re: [groovy-user] AspectG?

2010-06-16 Thread Matthew Adams
. De : Matthew Adams matt...@matthewadams.me À : aspectj-users@eclipse.org; u...@groovy.codehaus.org Envoyé le : Mar 15 juin 2010, 20h 04min 24s Objet : Re: [aspectj-users] Re: [groovy-user] AspectG? Cool.  I'll have a look.  While we're on the topic, anyone know of an AspectJ

[aspectj-users] [TROLLING] Vote for Groovy integration

2010-06-16 Thread Matthew Adams
Hi all, I'm shamelessly trolling for issue votes to have AspectJ provide tight integration with Groovy. Please vote for this issue if you're interested in seeing this. https://bugs.eclipse.org/bugs/show_bug.cgi?id=317060 The corresponding issue in Groovy is

[aspectj-users] Re: [groovy-user] AspectG?

2010-06-15 Thread Matthew Adams
. I'm curious about a full-blown, native Groovy version of AspectJ. -matthew 2010/6/14 Matthew Adams matt...@matthewadams.me [NB:  crossposting to both groovy aspectj user lists.  Replying to both would be cool.] Hi all, For me, using Groovy is like programming with lubrication -- makes

Re: [aspectj-users] Re: [groovy-user] AspectG?

2010-06-15 Thread Matthew Adams
http://pleiad.dcc.uchile.cl/papers/2010/toledoAl-aosd2010.pdf -- Éric On Jun 15, 2010, at 11:23 AM, Matthew Adams wrote: inline... On Mon, Jun 14, 2010 at 7:05 PM, Pierre Thibault pierre.thibau...@gmail.com wrote: You can create your aspects in AspectJ and do the weaving on the .class

[aspectj-users] AspectG?

2010-06-14 Thread Matthew Adams
[NB: crossposting to both groovy aspectj user lists. Replying to both would be cool.] Hi all, For me, using Groovy is like programming with lubrication -- makes programming slicker and faster with less resistance. However, since I use AspectJ with Java, I'm not willing to give up the power

[aspectj-users] How to prevent invocation or access of internal artifacts?

2010-04-26 Thread Matthew Adams
Sometimes you need to make public, due to the fact that all members of interfaces are public, methods that you don't really want public, but need to be public inside the component you're writing (see C#'s internal keyword, which allows access to the indicated method/constructor/field from anything

Re: [aspectj-users] Matching unwanted calls to toString()

2010-03-22 Thread Matthew Adams
I think the args pointcut expression is a binding device for the arguments of an advised method, not a filtering device -- correct me if I'm wrong, folks. I don't think you can do what you mean with a compile-time check. The closest that I think you can get is the following: declare warning:

Re: [aspectj-users] getting varargs to work in args and advise

2010-03-22 Thread Matthew Adams
Couldn't you just bind directly in the expression with the following? pointcut myPointcut(String aString, int[] anIntArray) : call(* myTestClass.setStrFld(String,int...)) args(aString,anIntArray); I mean, you could still use thisJoinPoint.getArgs(), but you could also just bind the arguments

Re: [aspectj-users] writing around advice for an unknown method

2010-03-19 Thread Matthew Adams
Two things: 1. call(* *(..)) means upon the call to **every** method, not a random one. 2. The sample advice is better written as the following. (Jean Louis's example would never execute stuff after due to the placement of his return statement.) Object around(): my point cut { stuff before

Re: [aspectj-users] Can we access any static join point information in declare error/warning?

2010-03-15 Thread Matthew Adams
Nice! On Fri, Mar 12, 2010 at 6:11 PM, Andy Clement andrew.clem...@gmail.com wrote: Hi, I did flinch a bit when I saw your syntax proposal of %...% (very Windows shell-esque) with cryptic tokens DT and N.  I'm never going to remember those (my brain's getting full needs to do some garbage

Re: [aspectj-users] Can we access any static join point information in declare error/warning?

2010-03-12 Thread Matthew Adams
I did flinch a bit when I saw your syntax proposal of %...% (very Windows shell-esque) with cryptic tokens DT and N. I'm never going to remember those (my brain's getting full needs to do some garbage collection, but the GC thread isn't at a high enough priority yet :) ). Please consider other

Re: [aspectj-users] DISCUSS: Syntax change suggestion

2010-02-19 Thread Matthew Adams
2010 20:44, Matthew Adams matt...@matthewadams.me wrote: inline... On Thu, Feb 11, 2010 at 12:22 PM, Andy Clement andrew.clem...@gmail.com wrote: Interesting.  When I first read it, I preferred: before : aMethodIWantToAdvise(String foo, Bar bar) { rather than ... I think that leaves me

  1   2   >