1 22 package org.jboss.test.aop.basic; 23 24 import java.util.HashSet ; 25 26 import org.jboss.aop.advice.Interceptor; 27 import org.jboss.aop.joinpoint.Invocation; 28 29 34 public class NamedInterceptor implements Interceptor 35 { 36 public static HashSet invoked = new HashSet (); 37 private String name; 38 39 public void setName(String name) 40 { 41 this.name = name; 42 } 43 44 public String getName() 45 { 46 return this.getClass().getName(); 47 } 48 49 public Object invoke(Invocation invocation) throws Throwable  50 { 51 invoked.add(name); 52 return invocation.invokeNext(); 53 } 54 55 56 } 57 | Popular Tags |