[jboss-cvs] JBossAS SVN: r94686 - in projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor: registry and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 12 11:56:56 EDT 2009
Author: marius.bogoevici
Date: 2009-10-12 11:56:55 -0400 (Mon, 12 Oct 2009)
New Revision: 94686
Modified:
projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadata.java
projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadataImpl.java
projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/registry/InterceptorClassMetadataRegistry.java
Log:
Adding support for serialization and interception of postconstruct and predestroy.
Modified: projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadata.java
===================================================================
--- projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadata.java 2009-10-12 15:50:36 UTC (rev 94685)
+++ projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadata.java 2009-10-12 15:56:55 UTC (rev 94686)
@@ -38,4 +38,5 @@
*/
List<Method> getInterceptorMethods(InterceptionType interceptionType);
+ boolean isInterceptor();
}
Modified: projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadataImpl.java
===================================================================
--- projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadataImpl.java 2009-10-12 15:50:36 UTC (rev 94685)
+++ projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/model/InterceptorClassMetadataImpl.java 2009-10-12 15:56:55 UTC (rev 94686)
@@ -41,6 +41,8 @@
private Map<InterceptionType, List<Method>> methodMap = new HashMap<InterceptionType, List<Method>>();
+ private boolean hasInterceptorMethods;
+
public InterceptorClassMetadataImpl(Class<?> interceptorClass)
{
this.interceptorClass = interceptorClass;
@@ -69,6 +71,7 @@
if (!foundMethods.contains(new MethodHolder(method, false)))
{
methodMap.get(interceptionType).add(0, method);
+ hasInterceptorMethods = true;
}
}
}
@@ -89,6 +92,11 @@
return methods == null ? Collections.EMPTY_LIST : methods;
}
+ public boolean isInterceptor()
+ {
+ return hasInterceptorMethods;
+ }
+
private Object writeReplace()
{
return new InterceptorClassMetadataSerializationProxy(getInterceptorClass().getName());
Modified: projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/registry/InterceptorClassMetadataRegistry.java
===================================================================
--- projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/registry/InterceptorClassMetadataRegistry.java 2009-10-12 15:50:36 UTC (rev 94685)
+++ projects/interceptors/trunk/jboss-interceptor/src/main/java/org/jboss/interceptor/registry/InterceptorClassMetadataRegistry.java 2009-10-12 15:56:55 UTC (rev 94686)
@@ -21,6 +21,7 @@
import org.jboss.interceptor.model.InterceptorClassMetadata;
import java.util.Map;
+import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
More information about the jboss-cvs-commits
mailing list