openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r910329 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: intercept/ intercept/ejb/ util/
Date Mon, 15 Feb 2010 20:21:09 GMT
Author: gerdogdu
Date: Mon Feb 15 20:21:08 2010
New Revision: 910329

URL: http://svn.apache.org/viewvc?rev=910329&view=rev
Log:
Update interceptor data comments and refactoring method names.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
  (contents, props changed)
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
  (contents, props changed)
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ejb/EJBInterceptorConfig.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java?rev=910329&r1=910328&r2=910329&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
Mon Feb 15 20:21:08 2010
@@ -40,73 +40,84 @@
  * calling web beans related inteceptors.
  * </p>
  * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
+ * @version $Rev$ $Date$
  */
 public interface InterceptorData
 {
     /**
-     * Gets the list of {@link PostConstruct} annotated methods.
-     * 
-     * @return the list of post-construct methods
+     * Gets {@link PostConstruct} annotated method if exist
+     * return null otherwise. 
+     * @return post-construct method
      */
     public Method getPostConstruct();
 
     /**
-     * Gets the list of {@link PreDestroy} annotated methods.
-     * 
-     * @return the list of pre-destroy methods
+     * Gets the list of {@link PreDestroy} annotated method
+     * if exist, returns null otherwise. 
+     * @return pre-destroy method
      */
     public Method getPreDestroy();
 
     /**
-     * Gets the list of {@link AroundInvoke} annotated methods.
-     * 
-     * @return the list of around invoke methods
+     * Gets {@link AroundInvoke} annotated method
+     * if exist, returns null otherwise. 
+     * @return around invoke method
      */
     public Method getAroundInvoke();
     
-    public Method getInterceptor();
+    /**
+     * Gets interceptor method that this
+     * interceptor data contains. It is one of
+     * the post construct, pre-destroy or around-invoke.
+     * @return interceptor method.
+     */
+    public Method getInterceptorMethod();
 
     /**
      * Sets the interceptor method.
-     * 
-     * @param m interceptor method
-     * @param annotation annotation class
+     * <p>
+     * Annotation is in
+     * <ul>
+     * <li>{@link PostConstruct}</li>
+     * <li>{@link PreDestroy}</li>
+     * <li>{@link AroundInvoke}</li> 
+     * </ul>
+     * </p>
+     * @param interceptorMethod interceptor method
+     * @param interceptorType interceptor annotation class
      */
-    public void setInterceptor(Method m, Class<? extends Annotation> annotation);
+    public void setInterceptorMethod(Method interceptorMethod, Class<? extends Annotation>
interceptorType);
 
     /**
      * Sets the source of the interceptor.
-     * 
+     * <p>
+     * Interceptor is defined by the bean itself or defined
+     * by the interceptor class.
+     * </p>
      * @param definedInInterceptorClass defined in interceptor class
      */
     public void setDefinedInInterceptorClass(boolean definedInInterceptorClass);
 
     /**
-     * Gets the interceptor instance.
-     * 
+     * Gets the interceptor instance. 
      * @return the interceptor instance
      */
     public Object getInterceptorInstance();
 
     /**
-     * Sets the interceptor instance.
-     * 
+     * Sets the interceptor instance. 
      * @param instance interceptor instance
      */
     public void setInterceptorInstance(Object instance);
 
     /**
-     * Checks the interceptor is defined at the method level.
-     * 
+     * Checks the interceptor is defined at the method level. 
      * @return inteceptor defined in method
      */
     public boolean isDefinedInMethod();
 
     /**
-     * Sets true if interceptor is defined at the method, false ow.
-     * 
+     * Sets true if interceptor is defined at the method, false ow. 
      * @param definedInMethod defined in method flag
      */
     public void setDefinedInMethod(boolean definedInMethod);
@@ -116,34 +127,46 @@
      * 
      * @return the method
      */
-    public Method getAnnotatedMethod();
+    public Method getInterceptorBindingMethod();
 
     /**
-     * Sets the interceptor annotated method.
-     * 
+     * Sets the interceptor annotated method. 
      * @param annotatedMethod interceptor annotated method.
      */
-    public void setAnnotatedMethod(Method annotatedMethod);
+    public void setInterceptorBindingMethod(Method annotatedMethod);
 
     /**
-     * Checks whether the interceptor is defined at the interceptor class.
-     * 
+     * Checks whether the interceptor is defined at the interceptor class. 
      * @return true if inteceptor is defined at the interceptor class
      */
     public boolean isDefinedInInterceptorClass();
 
     /**
      * Checks whether interceptor is configured with webbeans interceptor
-     * definition or not.
-     * 
+     * definition or not. 
      * @return true if interceptor is configured with webbeans interceptor
      *         definition
      */
     public boolean isDefinedWithWebBeansInterceptor();
-
+    
+    /**
+     * Sets JSR 299 style interceptor.
+     * @param webBeansInterceptor JSR 299 style interceptor
+     */
     public void setWebBeansInterceptor(Interceptor<?> webBeansInterceptor);
-
+    
+    /**
+     * Gets JSR 299 style interceptor bean
+     * that is responsible for producing interceptor
+     * instance that defines interceptor method.
+     * @return interceptor
+     */
     public Interceptor<?> getWebBeansInterceptor();
     
+    /**
+     * Returns true if lifecycle interceptor method
+     * false otherwise.
+     * @return true if lifecycle interceptor method
+     */
     public boolean isLifecycleInterceptor();
 }

Propchange: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorData.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java?rev=910329&r1=910328&r2=910329&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
Mon Feb 15 20:21:08 2010
@@ -23,9 +23,7 @@
 
 /**
  * Abstract implementation of the {@link InterceptorData} api contract.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
+ * @version $Rev$ $Date$ 
  */
 public class InterceptorDataImpl implements InterceptorData
 {
@@ -50,8 +48,8 @@
     private boolean definedInMethod;
 
     /**
-     * If defined in method true, then this method holds the interceptor
-     * annotated method
+     * If defined in method true, then this method holds
+     * interceptor binding annotated method
      */
     private Method annotatedMethod;
 
@@ -69,7 +67,7 @@
      * org.apache.webbeans.intercept.InterceptorData#setInterceptor(java.lang
      * .reflect.Method, java.lang.Class)
      */
-    public void setInterceptor(Method m, Class<? extends Annotation> annotation)
+    public void setInterceptorMethod(Method m, Class<? extends Annotation> annotation)
     {
         if (annotation.equals(AroundInvoke.class))
         {
@@ -211,7 +209,7 @@
      * (non-Javadoc)
      * @see org.apache.webbeans.intercept.InterceptorData#getAnnotatedMethod()
      */
-    public Method getAnnotatedMethod()
+    public Method getInterceptorBindingMethod()
     {
         return annotatedMethod;
     }
@@ -222,7 +220,7 @@
      * org.apache.webbeans.intercept.InterceptorData#setAnnotatedMethod(java
      * .lang.reflect.Method)
      */
-    public void setAnnotatedMethod(Method annotatedMethod)
+    public void setInterceptorBindingMethod(Method annotatedMethod)
     {
         this.annotatedMethod = annotatedMethod;
     }
@@ -253,7 +251,7 @@
         this.webBeansInterceptor = webBeansInterceptor;
     }
     
-    public Method getInterceptor()
+    public Method getInterceptorMethod()
     {
         if(aroundInvoke != null)
         {

Propchange: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorDataImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java?rev=910329&r1=910328&r2=910329&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorHandler.java
Mon Feb 15 20:21:08 2010
@@ -278,7 +278,7 @@
                 }
             }
             // If the interceptor is defined in a different method, remove it
-            if (id.isDefinedInMethod() && !id.getAnnotatedMethod().equals(method))
+            if (id.isDefinedInMethod() && !id.getInterceptorBindingMethod().equals(method))
             {
                 return true;
             }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ejb/EJBInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ejb/EJBInterceptorConfig.java?rev=910329&r1=910328&r2=910329&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ejb/EJBInterceptorConfig.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ejb/EJBInterceptorConfig.java
Mon Feb 15 20:21:08 2010
@@ -155,7 +155,7 @@
      */
     private static boolean removeInheritedButOverridenInterceptor(Class<?> clazz, InterceptorData
interceptorData)
     {    
-        Method interceptor = interceptorData.getInterceptor();
+        Method interceptor = interceptorData.getInterceptorMethod();
         Class<?> declaringClass = interceptor.getDeclaringClass();
         
         //Not look for Interceptor classes

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=910329&r1=910328&r2=910329&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Mon Feb 15 20:21:08 2010
@@ -1146,7 +1146,7 @@
             intData = new InterceptorDataImpl(isDefinedWithWebBeans);
             intData.setDefinedInInterceptorClass(definedInInterceptorClass);
             intData.setDefinedInMethod(definedInMethod);
-            intData.setAnnotatedMethod(annotatedInterceptorClassMethod);
+            intData.setInterceptorBindingMethod(annotatedInterceptorClassMethod);
             intData.setWebBeansInterceptor(webBeansInterceptor);
 
             if (definedInInterceptorClass)
@@ -1168,7 +1168,7 @@
                 }
             }
 
-            intData.setInterceptor(method, annotation);
+            intData.setInterceptorMethod(method, annotation);
 
             stack.add(intData);
         }
@@ -1212,7 +1212,7 @@
             intData = new InterceptorDataImpl(isDefinedWithWebBeans);
             intData.setDefinedInInterceptorClass(definedInInterceptorClass);
             intData.setDefinedInMethod(definedInMethod);
-            intData.setAnnotatedMethod(annotatedInterceptorClassMethod);
+            intData.setInterceptorBindingMethod(annotatedInterceptorClassMethod);
             intData.setWebBeansInterceptor(webBeansInterceptor);
 
             if (definedInInterceptorClass)
@@ -1234,7 +1234,7 @@
                 }
             }
 
-            intData.setInterceptor(method, annotation);
+            intData.setInterceptorMethod(method, annotation);
 
             stack.add(intData);
         }



Mime
View raw message