Results 1 to 6 of 6

Thread: Pointcuts in java

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Pointcuts in java

    Hello, I am student of the Bsc.I.T. and for casestudy I have got the subject of the Pointcuts in java. But, I am not having any knowledge about it, So, if anyone knows what is Pointcuts in java then please reply me about it. It will be helpful to me. So, I can able to create my case study.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Pointcuts in java

    If you want the definition of the pointcut then it is a similar the code element which can able to collect the join points and bring data data from the execution context of that join points. Most of the time use of the Pointcut is done with the advice. It provide the facility to create a boolean operators to build up other pointcuts. So, it help to create other pointcuts also.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Pointcuts in java

    While declaring Pointcuts you need to make use of the code below:

    Code:
    @Pointcut("call(* *.*(..))")
    void Method() 
    {
    }
    Or you can simply use the
    Code:
    pointcut Method() : call(* *.*(..));

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Pointcuts in java

    Pointcuts provides you following methods:
    • equals(Pointcut one, Pointcut two)
    • intersection(Pointcut one, Pointcut two)
    • matches(Pointcut one, Method met, Class target, Object[] args)
    • union(Pointcut one, Pointcut two)

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: Pointcuts in java

    Class Pointcuts comes under the java.lang.Object which is extended by org.springframework.aop.support.Pointcuts. This class provides the constants which are having ability to match the getters and setters. It also provides you the facility of the static methods which are useful for performing and evaluating pointcuts. You can make use of these methods for creating the Pointcuts with the help of the union and intersection methods.

  6. #6
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Pointcuts in java

    Hello, I am beginner in java. But, got the code below for pointcuts on internet. If it is helpful to your then make use of it.
    Code:
    @Pointcut("execution(* testing(..))")
    @Pointcut("execution(int com.dcci.spring.aop.HelloService.testing())")
    public void second() 
    {
    }
    
    @AfterReturning(pointcut="second()", returning="value")
    public void doAccessCheck(Object value) 
    {
    System.out.println("value=" + value);
    System.out.println("Another");
    }

Similar Threads

  1. Replies: 4
    Last Post: 04-09-2013, 11:04 PM
  2. Setting Of Java to The Point At Manual Java
    By winni in forum Software Development
    Replies: 4
    Last Post: 10-01-2011, 10:05 PM
  3. Comparison between core java and advanced java
    By Prashobh Mallu in forum Software Development
    Replies: 5
    Last Post: 19-01-2010, 10:57 AM
  4. Link List Example in Java Sample program in Java
    By trickson in forum Software Development
    Replies: 2
    Last Post: 04-08-2009, 08:23 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,570,108.82120 seconds with 16 queries