Created
April 17, 2013 02:47
-
-
Save dennysfredericci/5401404 to your computer and use it in GitHub Desktop.
A simple way to "build" a proxy for aspectj applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Aspect | |
public class PedidoAspect { | |
public interface Customer { | |
String getNome(); | |
}; | |
@DeclareParents("br.com.test.Cliente") | |
public static Customer customer; | |
@Before("execution(* br.com.test.Pedido.addCliente(..)) && args(customer)") | |
public void anyMethod(JoinPoint point, Customer customer) { | |
System.out.println(customer.getNome()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment