[webbeans-commits] Webbeans SVN: r509 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: bean and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Tue Dec 9 17:31:04 EST 2008


Author: nickarls
Date: 2008-12-09 17:31:04 -0500 (Tue, 09 Dec 2008)
New Revision: 509

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/FacadeImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/InstanceImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/FacadeBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ManagerBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
Log:
doc synchronization

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/FacadeImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/FacadeImpl.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/FacadeImpl.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -106,4 +106,15 @@
       return mergeBindingTypes(bindingTypes, newBindingTypes).toArray(new Annotation[0]);
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return A string representation
+    */
+   @Override
+   public String toString()
+   {
+      return "Abstract facade implmentation";
+   }
+
 }
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/InstanceImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/InstanceImpl.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/InstanceImpl.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -60,6 +60,11 @@
       return manager.getInstanceByType(type, mergeBindings(bindingTypes));
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return A string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -657,6 +657,11 @@
       return resolver;
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return A string representation
+    */
    @Override
    public String toString() {
       StringBuilder buffer = new StringBuilder();

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/MetaDataCache.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -149,6 +149,11 @@
       });
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return A string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -364,6 +364,11 @@
       return null;
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return A string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -89,21 +89,28 @@
 
    // Logger
    private LogProvider log = Logging.getLogProvider(AbstractBean.class);
-
+   // The binding types
    private Set<Annotation> bindingTypes;
+   // The name
    protected String name;
+   // The scope type 
    protected Class<? extends Annotation> scopeType;
+   // The merged stereotypes
    private MergedStereotypes<T, E> mergedStereotypes;
+   // The deployment type
    protected Class<? extends Annotation> deploymentType;
+   // The type
    protected Class<T> type;
+   // The remove method
    protected AnnotatedMethod<Object> removeMethod;
+   // The API types
    protected Set<Class<?>> apiTypes;
+   // The injection points
    protected Set<AnnotatedItem<?, ?>> injectionPoints;
-
+   // If the type a primitive?
    private boolean primitive;
-
+   // The Web Beans manager
    protected ManagerImpl manager;
-
    // Cached values
    private Type declaredBeanType;
 
@@ -198,6 +205,11 @@
       return;
    }
 
+   /**
+    * Gets the default deployment type
+    * 
+    * @return The default deployment type
+    */
    protected abstract Class<? extends Annotation> getDefaultDeploymentType();
 
    /**
@@ -344,14 +356,14 @@
    }
 
    /**
-    * Returns the annotated time the bean reresents
+    * Returns the annotated time the bean represents
     * 
     * @return The annotated item
     */
    protected abstract AnnotatedItem<T, E> getAnnotatedItem();
 
    /**
-    * Returns the binding types
+    * Gets the binding types
     * 
     * @return The set of binding types
     * 
@@ -363,7 +375,7 @@
    }
 
    /**
-    * Returns the declared bean type
+    * Gets the declared bean type
     * 
     * @return The bean type
     */
@@ -385,14 +397,14 @@
    }
 
    /**
-    * Returns the default name of the bean
+    * Gets the default name of the bean
     * 
     * @return The default name
     */
    protected abstract String getDefaultName();
 
    /**
-    * Returns the deployment type of the bean
+    * Gets the deployment type of the bean
     * 
     * @return The deployment type
     * 
@@ -404,7 +416,7 @@
    }
 
    /**
-    * Returns the injection points of the bean
+    * Gets the injection points of the bean
     * 
     * @return The set of injection points
     */
@@ -414,7 +426,7 @@
    }
 
    /**
-    * Returns the merged sterotypes of the bean
+    * Gets the merged stereotypes of the bean
     * 
     * @return The set of merged stereotypes
     */
@@ -424,7 +436,7 @@
    }
 
    /**
-    * Returns the name of the bean
+    * Gets the name of the bean
     * 
     * @return The name
     * 
@@ -436,7 +448,7 @@
    }
 
    /**
-    * Returns the remove method of the bean
+    * Gets the remove method of the bean
     * 
     * @return The remove method
     */
@@ -446,7 +458,7 @@
    }
 
    /**
-    * Returns the scope type of the bean
+    * Gets the scope type of the bean
     * 
     * @return The scope type
     * 
@@ -458,7 +470,7 @@
    }
 
    /**
-    * Returns the specializes type of the bean
+    * Gets the specializes type of the bean
     * 
     * @return The specialized type
     */
@@ -468,7 +480,7 @@
    }
 
    /**
-    * Returns the type of the bean
+    * Gets the type of the bean
     * 
     * @return The type
     */
@@ -478,7 +490,7 @@
    }
 
    /**
-    * Returns the API types of the bean
+    * Gets the API types of the bean
     * 
     * @return The set of API types
     * 
@@ -503,7 +515,7 @@
    }
 
    /**
-    * Inicates if bean is nullable
+    * Indicates if bean is nullable
     * 
     * @return True if nullable, false otherwise
     * 
@@ -540,7 +552,7 @@
    }
 
    /**
-    * Returns a string representation
+    * Gets a string representation
     * 
     * @return The string representation
     */

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -52,11 +52,13 @@
  */
 public abstract class AbstractClassBean<T> extends AbstractBean<T, Class<T>>
 {
-
+   // Logger
    private static final LogProvider log = Logging.getLogProvider(AbstractClassBean.class);
-
+   // The item representation
    private AnnotatedClass<T> annotatedItem;
+   // The injectable fields
    private Set<AnnotatedField<Object>> injectableFields;
+   // The initializer methods
    private Set<AnnotatedMethod<Object>> initializerMethods;
 
    /**
@@ -95,7 +97,7 @@
    }
 
    /**
-    * Returns the producer methods
+    * Gets the producer methods
     * 
     * @return A set of producer methods. An empty set is returned if there are
     *         none present
@@ -106,7 +108,7 @@
    }
 
    /**
-    * Returns the producer fields
+    * Gets the producer fields
     * 
     * @return A set of producer fields. An empty set is returned if there are
     *         none present
@@ -116,6 +118,11 @@
       return getAnnotatedItem().getAnnotatedFields(Produces.class);
    }
 
+   /**
+    * Gets the observer methods
+    * 
+    * @return A set of observer methods. An empty set is returned if there are no matches.
+    */
    public Set<AnnotatedMethod<Object>> getObserverMethods()
    {
       return getAnnotatedItem().getMethodsWithAnnotatedParameters(Observes.class);
@@ -229,7 +236,7 @@
    }
 
    /**
-    * Returns the annotated item
+    * Gets the annotated item
     * 
     * @return The annotated item
     */
@@ -240,7 +247,7 @@
    }
 
    /**
-    * Returns the default name
+    * Gets the default name
     * 
     * @return The default name
     */
@@ -253,7 +260,7 @@
    }
 
    /**
-    * Returns the injectable fields
+    * Gets the injectable fields
     * 
     * @return The set of injectable fields
     */
@@ -263,7 +270,7 @@
    }
 
    /**
-    * Returns the annotated methods
+    * Gets the annotated methods
     * 
     * @return The set of annotated methods
     */
@@ -273,7 +280,7 @@
    }
 
    /**
-    * Returns a string representation
+    * Gets a string representation
     * 
     * @return The string representation
     */
@@ -296,6 +303,11 @@
    }
 
    @Override
+   /**
+    * Gets the default deployment type
+    * 
+    * @return The default deployment type
+    */
    protected Class<? extends Annotation> getDefaultDeploymentType()
    {
       return Production.class;

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -271,7 +271,7 @@
    }
 
    /**
-    * Returns the specializes type of the bean
+    * Gets the specializes type of the bean
     * 
     * @return The specialized type
     */
@@ -305,7 +305,7 @@
    }
 
    /**
-    * Returns the EJB metadata
+    * Gets the EJB metadata
     * 
     * @return The metadata
     */
@@ -314,6 +314,11 @@
       return ejbMetaData;
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -31,6 +31,7 @@
  * @author David Allen
  * 
  * @param <T>
+ * @param <S>
  */
 public class EventBean<T, S> extends FacadeBean<Event<T>, S, T>
 {
@@ -46,6 +47,11 @@
       super(field, manager);
    }
 
+   /**
+    * Creates an instance
+    * 
+    * @return an event instance
+    */
    @Override
    public Event<T> create()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/FacadeBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/FacadeBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/FacadeBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -32,16 +32,24 @@
  * Facade bean for implicit beans
  * 
  * @author Gavin King
- *
+ * 
  * @param <T>
  * @param <S>
  * @param <P>
  */
-public abstract class FacadeBean<T, S, P> extends AbstractBean<T, S> {
-
+public abstract class FacadeBean<T, S, P> extends AbstractBean<T, S>
+{
+   // The underlying item
    protected AnnotatedItem<T, S> annotatedItem;
 
-   public FacadeBean(AnnotatedItem<T, S> field, ManagerImpl manager) {
+   /**
+    * Constructor
+    * 
+    * @param field The facaded field
+    * @param manager The Web Beans manager
+    */
+   public FacadeBean(AnnotatedItem<T, S> field, ManagerImpl manager)
+   {
       super(manager);
       this.annotatedItem = field;
       init();
@@ -52,7 +60,8 @@
     * 
     * Calls super method and validates the annotated item
     */
-   protected void init() {
+   protected void init()
+   {
       super.init();
       checkAnnotatedItem();
    }
@@ -60,7 +69,8 @@
    /**
     * Validates the annotated item
     */
-   private void checkAnnotatedItem() {
+   private void checkAnnotatedItem()
+   {
       Type[] actualTypeArguments = annotatedItem.getActualTypeArguments();
       if (actualTypeArguments.length != 1)
       {
@@ -72,37 +82,73 @@
       }
    }
 
-   protected Annotation[] getBindingTypesArray() {
+   /*
+    * Gets the binding type as an array
+    * 
+    * @return The binding types
+    */
+   protected Annotation[] getBindingTypesArray()
+   {
       return annotatedItem.getBindingTypesAsArray();
    }
 
+   /**
+    * Gets the type paramater of the facade
+    * 
+    * @return The type parameter
+    */
    @SuppressWarnings("unchecked")
-   protected Class<P> getTypeParameter() {
+   protected Class<P> getTypeParameter()
+   {
       return (Class<P>) annotatedItem.getType().getTypeParameters()[0].getClass();
    }
 
+   /**
+    * Initializes the scope type to dependent
+    */
    @Override
-   protected void initScopeType() {
+   protected void initScopeType()
+   {
       this.scopeType = Dependent.class;
    }
 
+   /**
+    * Initializes the deployment type to Standard
+    */
    @Override
-   protected void initDeploymentType() {
+   protected void initDeploymentType()
+   {
       this.deploymentType = Standard.class;
    }
 
+   /**
+    * Gets the underlying item
+    * 
+    * @return The underlying item
+    */
    @Override
-   protected AnnotatedItem<T, S> getAnnotatedItem() {
+   protected AnnotatedItem<T, S> getAnnotatedItem()
+   {
       return annotatedItem;
    }
 
+   /**
+    * Gets the default name
+    * 
+    * @return The default name
+    */
    @Override
-   protected String getDefaultName() {
+   protected String getDefaultName()
+   {
       return null;
    }
 
+   /**
+    * Initializes the type
+    */
    @Override
-   protected void initType() {
+   protected void initType()
+   {
       try
       {
          if (getAnnotatedItem() != null)
@@ -117,11 +163,15 @@
       }
    }
 
+   /**
+    * Gets the default deployment type, Production
+    */
    @Override
-   protected Class<? extends Annotation> getDefaultDeploymentType() {
+   protected Class<? extends Annotation> getDefaultDeploymentType()
+   {
       return Production.class;
    }
-   
+
    /**
     * Returns a string representation
     * 
@@ -130,7 +180,7 @@
    @Override
    public String toString()
    {
-      return "FacadeBean " + getName();
-   }   
+      return "FacadeBean " + getName() + " for " + annotatedItem;
+   }
 
 }
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -27,83 +27,148 @@
  * A delegating bean
  * 
  * @author Pete Muir
- *
+ * 
  * @param <T>
  */
 public abstract class ForwardingBean<T> extends Bean<T>
 {
-   
+
+   /**
+    * Constructor
+    * 
+    * @param manager The Web Beans manager
+    */
    public ForwardingBean(Manager manager)
    {
       super(manager);
    }
 
+   /**
+    * Creates an instance of the delegate
+    * 
+    * @return an instance of the delegate
+    */
    @Override
    public T create()
    {
       return delegate().create();
    }
 
+   /**
+    * Destroys an instance through the delegate
+    * 
+    * @param instance The instance to destroy
+    */
    @Override
    public void destroy(T instance)
    {
       delegate().destroy(instance);
    }
 
+   /**
+    * Gets the binding types of the delegate
+    * 
+    * @return The binding types
+    */
    @Override
    public Set<Annotation> getBindingTypes()
    {
       return delegate().getBindingTypes();
    }
 
+   /**
+    * Gets the deployment types of the delegate
+    * 
+    * @return The deployment types
+    */
    @Override
    public Class<? extends Annotation> getDeploymentType()
    {
       return delegate().getDeploymentType();
    }
 
+   /**
+    * Gets the name of the delegate
+    * 
+    * @return The name
+    */
    @Override
    public String getName()
    {
       return delegate().getName();
    }
 
+   /**
+    * Gets the scope type of the delegate
+    * 
+    * @return The scope type
+    */
    @Override
    public Class<? extends Annotation> getScopeType()
    {
       return delegate().getScopeType();
    }
 
+   /**
+    * Gets the API types of the delegate
+    * 
+    * @return The API types
+    */
    @Override
    public Set<Class<?>> getTypes()
    {
       return delegate().getTypes();
    }
 
+   /**
+    * Indicates if the delegate is nullable
+    * 
+    * @return True if nullable, false otherwise
+    */
    @Override
    public boolean isNullable()
    {
       return delegate().isNullable();
    }
 
+   /**
+    * Indicates if the delegate is serializable
+    * 
+    * @return True if serializable, false otherwise
+    */
    @Override
    public boolean isSerializable()
    {
       return delegate().isSerializable();
    }
-   
+
+   /**
+    * Gets the hash code of the delegate
+    * 
+    * @return The hash code
+    */
    @Override
    public int hashCode()
    {
       return delegate().hashCode();
    }
-   
+
+   /**
+    * Compares an object with the delegate
+    * 
+    * @return True if equals, false otherwise
+    */
    @Override
    public boolean equals(Object obj)
    {
       return delegate().equals(obj);
    }
-   
+
+   /**
+    * Abstract getter for the delegate
+    * 
+    * @return The delegate
+    */
    protected abstract Bean<T> delegate();
 
    /**
@@ -114,7 +179,7 @@
    @Override
    public String toString()
    {
-      return "ForwardingBean " + getName();
-   }   
-   
+      return "ForwardingBean " + getName() + " for " + delegate().toString();
+   }
+
 }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ManagerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ManagerBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ManagerBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -34,71 +34,120 @@
  * Helper bean for accessing the Manager
  * 
  * @author Gavin King
- *
+ * 
  */
 public class ManagerBean extends Bean<Manager>
 {
-   
+   // The API types of the manager
    private static Set<Class<?>> types = Reflections.getTypeHierachy(Manager.class);
+   // The binding types of the manager
    private static final Set<Annotation> BINDING = new HashSet<Annotation>(Arrays.asList(new CurrentAnnotationLiteral()));
 
+   /**
+    * Constructor
+    * 
+    * @param manager The Web Beans manager
+    */
    public ManagerBean(Manager manager)
    {
       super(manager);
    }
-   
+
+   /**
+    * Creates an instance of the manager
+    * 
+    * @return An instance
+    */
    @Override
    public Manager create()
    {
       return getManager();
    }
 
+   /**
+    * Destroys the manager (not)
+    */
    @Override
    public void destroy(Manager instance)
    {
-      //No -op
+      // No -op
    }
 
+   /**
+    * Gets the binding types
+    * 
+    * @return A set containing Current
+    */
    @Override
    public Set<Annotation> getBindingTypes()
    {
       return BINDING;
    }
 
+   /**
+    * Gets the deployment types
+    * 
+    * @return Standard
+    */
    @Override
    public Class<? extends Annotation> getDeploymentType()
    {
       return Standard.class;
    }
 
+   /**
+    * Gets the name
+    * 
+    * @return null
+    */
    @Override
    public String getName()
    {
       return null;
    }
 
+   /**
+    * Gets the scope type
+    * 
+    * @return Dependent
+    */
    @Override
    public Class<? extends Annotation> getScopeType()
    {
       return Dependent.class;
    }
 
+   /**
+    * Gets the API types
+    * 
+    * @return The API types
+    */
    @Override
    public Set<Class<?>> getTypes()
    {
       return types;
    }
 
+   /**
+    * Indicates if the bean is nullable
+    * 
+    * @return true
+    */
    @Override
    public boolean isNullable()
    {
       return true;
    }
 
+   /**
+    * Indicates if the bean is serializable
+    * 
+    * @return false
+    */
    @Override
    public boolean isSerializable()
    {
       return false;
    }
-   
+
 }
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -29,23 +29,38 @@
 import org.jboss.webbeans.util.Names;
 
 /**
+ * The implicit producer bean
  * 
  * @author Gavin King
- *
+ * 
  * @param <T>
  * @param <S>
  */
-public abstract class ProducerBean<T, S> extends AbstractBean<T, S> {
-
+public abstract class ProducerBean<T, S> extends AbstractBean<T, S>
+{
+   // The declaring bean
    protected AbstractClassBean<?> declaringBean;
 
-   public ProducerBean(AbstractClassBean<?> declaringBean, ManagerImpl manager) {
+   /**
+    * Constructor
+    * 
+    * @param declaringBean The declaring bean
+    * @param manager The Web Beans manager
+    */
+   public ProducerBean(AbstractClassBean<?> declaringBean, ManagerImpl manager)
+   {
       super(manager);
       this.declaringBean = declaringBean;
    }
 
+   /**
+    * Gets the deployment types
+    * 
+    * @return The deployment types of the declaring bean
+    */
    @Override
-   protected Class<? extends Annotation> getDefaultDeploymentType() {
+   protected Class<? extends Annotation> getDefaultDeploymentType()
+   {
       return deploymentType = declaringBean.getDeploymentType();
    }
 
@@ -53,7 +68,8 @@
     * Initializes the API types
     */
    @Override
-   protected void initApiTypes() {
+   protected void initApiTypes()
+   {
       if (getType().isArray() || getType().isPrimitive())
       {
          apiTypes = new HashSet<Class<?>>();
@@ -84,25 +100,27 @@
             this.type = getAnnotatedItem().getType();
          }
       }
-      catch (ClassCastException e) 
+      catch (ClassCastException e)
       {
          throw new RuntimeException(" Cannot cast producer type " + getAnnotatedItem().getType() + " to bean type " + (getDeclaredBeanType() == null ? " unknown " : getDeclaredBeanType()), e);
       }
    }
-   
+
    /**
     * Returns the declaring bean
     * 
     * @return The bean representation
     */
-   public AbstractClassBean<?> getDeclaringBean() {
+   public AbstractClassBean<?> getDeclaringBean()
+   {
       return declaringBean;
    }
 
    /**
     * Validates the producer method
     */
-   protected void checkProducerReturnType() {
+   protected void checkProducerReturnType()
+   {
       for (Type type : getAnnotatedItem().getActualTypeArguments())
       {
          if (!(type instanceof Class))
@@ -116,23 +134,40 @@
     * Initializes the bean and its metadata
     */
    @Override
-   protected void init() {
+   protected void init()
+   {
       super.init();
       checkProducerReturnType();
    }
 
-   protected void checkReturnValue(T instance) {
+   /**
+    * Validates the return value
+    * 
+    * @param instance The instance to validate
+    */
+   protected void checkReturnValue(T instance)
+   {
       if (instance == null && !getScopeType().equals(Dependent.class))
       {
          throw new IllegalProductException("Cannot return null from a non-dependent producer method");
       }
    }
 
-   protected Object getReceiver() {
-      return getAnnotatedItem().isStatic() ? 
-              null : manager.getInstance(getDeclaringBean());
+   /**
+    * Gets the receiver of the product
+    * 
+    * @return The receiver
+    */
+   protected Object getReceiver()
+   {
+      return getAnnotatedItem().isStatic() ? null : manager.getInstance(getDeclaringBean());
    }
-   
+
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {
@@ -149,6 +184,6 @@
       buffer.append(" [" + getType().getName() + "]\n");
       buffer.append("   API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
       return buffer.toString();
-   }     
+   }
 
 }
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -33,7 +33,7 @@
  */
 public class ProducerFieldBean<T> extends ProducerBean<T, Field>
 {
-   
+   // The underlying field
    private AnnotatedField<T> field;
    
    /**
@@ -97,6 +97,11 @@
       return field.getPropertyName();
    }
    
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */   
    @Override
    public String toString()
    {
@@ -125,5 +130,4 @@
       return buffer.toString();      
    }
 
-   
 }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -41,7 +41,7 @@
  */
 public class ProducerMethodBean<T> extends ProducerBean<T, Method>
 {
-   
+   // The underlying method
    private AnnotatedMethod<T> method;
 
    /**
@@ -184,7 +184,11 @@
       return removeMethod;
    }
 
-
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {
@@ -213,5 +217,4 @@
       return buffer.toString();      
    }
 
-   
 }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -46,13 +46,15 @@
  */
 public class SimpleBean<T> extends AbstractClassBean<T>
 {
-
+   // Logger
    private static LogProvider log = Logging.getLogProvider(SimpleBean.class);
+   // Empty list representing no-args
    private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
-
+   // The constructor
    private AnnotatedConstructor<T> constructor;
-
+   // The post-construct method
    private AnnotatedMethod<Object> postConstruct;
+   // The pre-destroy method
    private AnnotatedMethod<Object> preDestroy;
    
    /**
@@ -347,6 +349,11 @@
       return preDestroy;
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyMethodHandler.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -40,8 +40,9 @@
 public class ProxyMethodHandler implements MethodHandler, Serializable
 {
    private static final long serialVersionUID = -5391564935097267888L;
-
+   // The bean
    private transient Bean<?> bean;
+   // The bean index in the manager
    private int beanIndex;
 
    /**
@@ -80,6 +81,11 @@
       return proxiedMethod.invoke(proxiedInstance, args);
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java	2008-12-09 22:00:33 UTC (rev 508)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/proxy/ProxyPool.java	2008-12-09 22:31:04 UTC (rev 509)
@@ -162,6 +162,11 @@
       });
    }
 
+   /**
+    * Gets a string representation
+    * 
+    * @return The string representation
+    */
    @Override
    public String toString()
    {




More information about the weld-commits mailing list