Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Re: another newbie question: avoid constructor calls .. !initialize ?

It can be configured, as with most inspections in IntelliJ. When the
cursor is on the keyword underlined in red (unsupported in Spring
AOP), use Alt-Enter to access the inspection's setting (Spring AOP
Errors) and either disable it or change its severity.

Frank

On Wed, Jul 14, 2010 at 8:02 AM, Ramnivas Laddad
<ramnivas@xxxxxxxxxxxxxxx> wrote:
> This sounds like a bug in IntelliJ that you may want to raise with them. I
> remember someone else mentioned this as well (basically, its editor seems to
> recognize only pointcuts supported by Spring AOP).
> -Ramnivas
>
> On Tue, Jul 13, 2010 at 8:06 PM, Stephen Boesch <javadba@xxxxxxxxx> wrote:
>>
>> I'm using the AspectJ weaver (in Intellij) -- so I think that means it
>> should be supported .. ?
>>
>> 2010/7/13 Ramnivas Laddad <ramnivas@xxxxxxxxxxxxxxx>
>>>
>>> Are you using Spring AOP (i.e. proxy-based AOP) or AspectJ (i.e.
>>> byte-code weaving based AOP)?
>>> -Ramnivas
>>>
>>> On Tue, Jul 13, 2010 at 5:20 PM, Stephen Boesch <javadba@xxxxxxxxx>
>>> wrote:
>>>>
>>>> I am getting a warning/error from my IDE that Spring does not support
>>>> initialization pointcuts (among others) - only execution.
>>>> So is this error directly attributed to the Spring limitation?  If so,
>>>> here's what I want to do:  instrument all public non-constructor methods of
>>>> descendants of  BaseDao class as well as BaseDao itself.   Here is my
>>>> attempt:
>>>> @Around(value = "!initialization(new(..))  && execution(public * *Dao.*
>>>> (..))  && this(dao)", argNames = "thisJoinPoint, dao")
>>>>   public Object aroundApplyStatisticsMethod (ProceedingJoinPoint
>>>> thisJoinPoint, WaterfallORMDao dao)
>>>>     throws Throwable {
>>>> ...
>>>> I imagine it's a v common thing to want to instrument all public
>>>> non-constructor methods. Help pls ;)
>>>>
>>>> 2010/7/13 Stephen Boesch <javadba@xxxxxxxxx>
>>>>>
>>>>>  Pls correct my "humble" (read: "incorrect"..) attempt at having the
>>>>> pointcut avoid all constructors:
>>>>> @Around(value = "!initialization(new(..))  && < other conditions ..>
>>>>
>>>> _______________________________________________
>>>> aspectj-users mailing list
>>>> aspectj-users@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> aspectj-users mailing list
>>> aspectj-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top