Questions tagged [pointcut]
221 questions
0
votes
1 answer
PointCut to match method annotated with certain params to the annotation
I have this PointCut
@Pointcut("execution(@com.foo.bar.aspect.annotation.MyAnnotation* * (..))"
+ "&& @annotation(annot)")
public void anyFoo(MyAnnotation annot)
{
}
MyAnnotation looks like…

0x56794E
- 20,883
- 13
- 42
- 58
0
votes
0 answers
Interception android with aspectj
Is it possible, using aspect intercept URL from activity ?
pointcut callHttpResponse() :
call(* org.apache.http.HttpResponse..*.*(..));

khouloud mejdoub
- 973
- 1
- 7
- 14
0
votes
1 answer
Same ear throws Pointcut error in weblogic 12c and not in weblogic 11g
EAR deployed successfully and working fine in weblogic 11g whereas the same is failing in weblogic 12c.
The error is as follows.
*User defined listener org.springframework.web.context.ContextLoaderListener failed:…

souashokraj
- 81
- 1
- 1
- 4
0
votes
1 answer
how to write Get() pointcut to retrive the attributes that have been used in the program in AspectJ
I have written the following pointcut but it is giving the run time error (Exception in thread "main" java.lang.StackOverflowError)
pointcut traceAttribs():(get(* *));

Himanshu dua
- 2,496
- 1
- 20
- 27
0
votes
1 answer
Java - Spring AOP Pointcut not working
Can someone pinpoint what am I doing wrong? How can I make my Aspect run?
I have written this code following some examples:
@Aspect
public class MethodLogger {
private Logger log = Logger.getLogger(getClass().getName());
…

Andrius
- 19,658
- 37
- 143
- 243
0
votes
1 answer
Pointcuts are not triggered
I have a Spring 3.2.4 MVC application and I want to use Spring AOP. Hence, I have created a config file with an .
I also have written an Aspect (adopted to code found in the web):
@Component
@Aspect
public class…

du-it
- 2,561
- 8
- 42
- 80
0
votes
1 answer
Spring AOP advices around objects returned by Hibernate
Spring AOP advises are NOT kicking off around methods of objects returned by hibernate.
In my program, hibernate is returning list of objects of type CFolder.
What I want is when somebody calls getName() method on CFolder objects returned by the…

bhattsu
- 5
- 1
- 1
0
votes
1 answer
Issue with collecting AspectJ pointcut context and avoiding mentioning all arguments of the advised method
I use AspectJ in order to check whether an object does belong to the current user. The advised method is actually a Spring MVC controller method. I use an annotation placed on that controller method in order to apply the crosscutting security…

balteo
- 23,602
- 63
- 219
- 412
0
votes
1 answer
Get method parameter instance in Pointcut implementation
I have one requirement to get the intercepted method's parameter value from pointcut implementation as follows.
Intercepted method :
public void execute(Object mapValues)throws Throwable{
....
}
and in Aspect Implementation
@AfterThrowing(pointcut…

abhijit nag
- 451
- 6
- 24
0
votes
1 answer
Pointcut expression is not working with Custom Annotation
I have following Custom Annotation.
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Scheduled {
String cron() default "";
.....
Implementation class
@Named
public class JobDefination…

abhijit nag
- 451
- 6
- 24
0
votes
1 answer
Spring @AspectJ @Pointcut to match regardless of argument list
How do I write a Spring @AspectJ point-cut (@Pointcut) expression that matches all public methods in a class, regardless of their argument list?
I want an aspect that has @AfterThrowing point-cuts for all the public methods of a particular class…

Raedwald
- 46,613
- 43
- 151
- 237
0
votes
1 answer
Exposing context with AspectJ
I know that I can retrieve the arguments sent to a method, but how could I get objects defined in that method? For example, this is my class:
public class Sample {
public static void sendMessage(String message) {
String x =…

Sorin
- 908
- 2
- 8
- 19
0
votes
1 answer
AspectJ/Java instrumentation to intercept an annoted parameter call/usage
I would like to know how the doMonitorization method can be called when the param1 is used (param defined and used on the methods of the TestClassGeneralMeasuraments Class) which has the correct annotation that has a interception AspectJ definition…

Axel
- 15
- 3
0
votes
1 answer
Most used pointcuts
Regarding AspectJ and AOP in general:
What are the most used pointcut primitives?
Are there any statistics on this?
I think it could be execution and call, is that right?
Thanks.

Thorben
- 953
- 13
- 28
0
votes
1 answer
How can I make this @Pointcut expression work?
I'm really having problem in advicing methods with pointcuts expressions.
I have the following configuration:
Spring 3.1.2.RELEASE
pom.xml
org.springframework
spring-aop
…

MaVVamaldo
- 2,505
- 7
- 28
- 50