You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2013/02/18 19:14:54 UTC
svn commit: r1447413 - in
/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2:
BeanAccessor.java BeanReflectionException.java ClassAccessor.java
ClassLoaderBuilder.java
Author: britter
Date: Mon Feb 18 18:14:54 2013
New Revision: 1447413
URL: http://svn.apache.org/r1447413
Log:
Remove obsolete <p>-tags from JavaDoc as discussed on the ML (http://markmail.org/message/qrexlrzenpfwbmjw)
Modified:
commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java
commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanReflectionException.java
commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassAccessor.java
commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassLoaderBuilder.java
Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java?rev=1447413&r1=1447412&r2=1447413&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanAccessor.java Mon Feb 18 18:14:54 2013
@@ -22,9 +22,7 @@ package org.apache.commons.beanutils2;
import java.util.Map;
/**
- * <p>
* Provides access to properties and methods of a bean.
- * </p>
*
* @param <B> the type of the bean this BeanAcessor is associated with.
*/
@@ -34,10 +32,8 @@ public interface BeanAccessor<B>
// get
/**
- * <p>
* Gets the value of the property with name {@code propertyName} from the bean wrapped by this BeanAccessor. The
* value will be wrapped in a {@code BeanAccessor} to enable fluent calls.
- * </p>
*
* @param propertyName the name of the property to get the value from. Must not be {@code null}!
* @return a {@code BeanAccessor} wrapping the properties value.
@@ -45,10 +41,8 @@ public interface BeanAccessor<B>
BeanAccessor<?> get( String propertyName );
/**
- * <p>
* Selects the indexed property with name {@code propertyName} from the bean wrapped by this {@code BeanAccessor}. A
* {@link IndexedPropertyGetterAccessor} will be returned for specifying the index to return the value of.
- * </p>
*
* @param propertyName the name of the indexed property to select. Must not be {@code null}!
* @return a {@link IndexedPropertyGetterAccessor} for specifying the index to return the value of.
@@ -56,10 +50,8 @@ public interface BeanAccessor<B>
IndexedPropertyGetterAccessor<?> getIndexed( String propertyName );
/**
- * <p>
* Selects the mapped property with name {@code propertyName} from the bean wrapped by this {@code BeanAccessor}. A
* {@link MappedPropertyGetterAccessor} will be returned for specifying the key to return the value of.
- * </p>
*
* @param propertyName the name of the mapped property to select. Must not be {@code null}!
* @return a {@link MappedPropertyGetterAccessor} for specifying the key to return the value of.
@@ -67,18 +59,14 @@ public interface BeanAccessor<B>
MappedPropertyGetterAccessor getMapped( String propertyName );
/**
- * <p>
* Gets the bean wrapped by this {@code BeanAccessor}.
- * </p>
*
* @return the bean.
*/
B get();
/**
- * <p>
* Tries to cast the bean wrapped by this {@code BeanAccessor} an returns the result.
- * </p>
*
* @param <V> the type to cast the wrapped bean to.
* @return the wrapped bean, casted to type {@code V}.
@@ -88,10 +76,8 @@ public interface BeanAccessor<B>
// set
/**
- * <p>
* Selects the property with name {@code propertyName} for setting a new value. A {@link BeanPropertySetter} will be
* returned for specifying the new value.
- * </p>
*
* @param propertyName the name of the property to select for setting a new value. Must not be {@code null}.
* @return a {@link BeanPropertySetter} for setting a new value.
@@ -99,10 +85,8 @@ public interface BeanAccessor<B>
BeanPropertySetter<B> set( String propertyName );
/**
- * <p>
* Selects the indexed property with name {@code propertyName} for setting a new value. A
* {@link IndexedPropertySetterAccessor} will be returned for specifying the index to set a new value to.
- * </p>
*
* @param propertyName the name of the indexed property to select for setting a new value. Must not be {@code null}.
* @return a {@link IndexedPropertySetterAccessor} for setting a new value.
@@ -110,10 +94,8 @@ public interface BeanAccessor<B>
IndexedPropertySetterAccessor<B> setIndexed( String propertyName );
/**
- * <p>
* Selects the mapped property with name {@code propertyName} for setting a new value. A
* {@link MappedPropertySetterAccessor} will be returned for specifying the key to set a new value to.
- * </p>
*
* @param propertyName the name of the mapped property to select for setting a new value. Must not be {@code null}.
* @return a {@link MappedPropertySetterAccessor} for setting a new value.
@@ -123,37 +105,30 @@ public interface BeanAccessor<B>
// clone
/**
- * <p>
* Clones a bean based on the available property getters and setters, even if the bean class itself does not
* implement Cloneable.
- * </p>
* <p>
* <strong>Note:</strong> this method creates a <strong>shallow</strong> clone. In other words, any objects referred
* to by the bean are shared with the clone rather than being cloned in turn.
- * </p>
*
* @return the cloned bean
*/
B cloneBean();
/**
- * <p>
* Copies property values from the bean wrapped by this {@code BeanAccessor} to {@code target} for all cases where
* the property names are the same. For each property, a conversion is attempted as necessary.
- * </p>
* <p>
* <strong>Note</strong> that this method is intended to perform a "shallow copy" of the properties and so complex
* properties (for example, nested ones) will not be copied.
- * </p>
+ * <p>
* <strong>TODO</strong> should we implement something like the following?
* <p>
* If you know that no type conversions are required, the <code>copyProperties()</code> method in
* {@link PropertyUtils} will execute faster than this method.
- * </p>
* <p>
* <strong>FIXME</strong> - Indexed and mapped properties that do not have getter and setter methods for the
* underlying array or Map are not copied by this method.
- * </p>
*
* @param <T> the type of the bean to copy properties to.
* @param target the target to copy properties to from the wrapped bean
@@ -163,16 +138,13 @@ public interface BeanAccessor<B>
// description
/**
- * <p>
* Return the entire set of properties for which the specified bean provides a read method. This map contains the
* property names as keys and the property values as values, for all properties the bean provides a read method for
* (i.e. where the getReadMethod() returns non-null).
- * </p>
* <p>
* This map can be fed back to a call to <code>BeanAccessor.populate()</code> to reconstitute the same set of
* properties, modulo differences for read-only and write-only properties, but only if there are no indexed
* properties.
- * </p>
* <p>
* <strong>Warning:</strong> if any of the bean property implementations contain (directly or indirectly) a call to
* this method then a stack overflow may result. For example: <code><pre>
@@ -185,17 +157,14 @@ public interface BeanAccessor<B>
* }
* </pre></code> will result in an infinite regression when <code>getParametersMap</code> is called. It is
* recommended that such methods are given alternative names (for example, <code>parametersMap</code>).
- * </p>
*
* @return Map that contains the property names as keys and property values as values.
*/
Map<String, Object> describe();
/**
- * <p>
* Populate {@code properties} to the bean wrapped by this {@code BeanAccessor}. The map of properties passed to
* this method has to specify names of properties to set and corresponding values as key-value-pairs.
- * </p>
*
* @param properties Map keyed by property name, with the corresponding value to be set.
* Must not be {@code null}.
@@ -205,10 +174,8 @@ public interface BeanAccessor<B>
// methods invocation
/**
- * <p>
* Invokes the method with name {@code methodName}. An {@link ArgumentsAccessor} will be returned to specify the
* parameters for the method invocation.
- * </p>
*
* @param methodName the name of the method to invoke. Must not be {@code null}!
* @return an {@link ArgumentsAccessor} to specify arguments for the method invocation.
@@ -216,10 +183,8 @@ public interface BeanAccessor<B>
ArgumentsAccessor invoke( String methodName );
/**
- * <p>
* Invokes the method with name {@code methodName} and the exact arguments. An {@link ArgumentsAccessor} will be
* returned to specify the parameters for the method invocation.
- * </p>
*
* @param methodName the name of the method to invoke. Must not be {@code null}!
* @return a {@link ArgumentsAccessor} to specify any arguments
Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanReflectionException.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanReflectionException.java?rev=1447413&r1=1447412&r2=1447413&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanReflectionException.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/BeanReflectionException.java Mon Feb 18 18:14:54 2013
@@ -22,10 +22,8 @@ package org.apache.commons.beanutils2;
import static java.lang.String.format;
/**
- * <p>
* Base class for exceptions thrown by the library. Subclasses are used for wrapping the checked exceptions thrown by the
* {@code java.lang.refelct} and {@code java.lang.introspection} APIs.
- * </p>
*/
public class BeanReflectionException
extends RuntimeException
@@ -35,9 +33,7 @@ public class BeanReflectionException
private final Class<?> beanType;
/**
- * <p>
* Constructs a new instance of {@code BeanReflectionException}.
- * </p>
*
* @param cause the throwable that caused the exception.
* @param beanType the bean type, the exception is associated with.
@@ -51,9 +47,7 @@ public class BeanReflectionException
}
/**
- * <p>
* Constructs a new instance of {@code BeanReflectionException}.
- * </p>
*
* @param cause the throwable that caused the exception.
* @param beanType the bean type, the exception is associated with.
@@ -65,11 +59,9 @@ public class BeanReflectionException
}
/**
- * <p>
* Returns the type that caused the exception. This may be the {@link Class} object that was the target of a static
* method or constructor invocation (via a {@link ClassAccessor}) or the {@link Class} of a bean that was the target
* of a method invocation or property access (via a {@link BeanAccessor}).
- * </p>
*
* @return the type that caused the exception.
*/
Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassAccessor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassAccessor.java?rev=1447413&r1=1447412&r2=1447413&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassAccessor.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassAccessor.java Mon Feb 18 18:14:54 2013
@@ -20,9 +20,7 @@ package org.apache.commons.beanutils2;
*/
/**
- * <p>
* Provides access to constructors and static methods on a class.
- * </p>
*
* @param <B> The type modeled by this {@code ClassAccessor}.
*/
@@ -32,9 +30,7 @@ public interface ClassAccessor<B>
// constructors
/**
- * <p>
* Creates a new instance of type {@code B} by calling the parameterless constructor of the wrapped class.
- * </p>
*
* @return a {@link BeanAccessor} that wraps the new instance.
* @throws BeanInstantiationException if the class wrapped by this {@code ClassAccessor} is not instantiable (for
@@ -47,10 +43,8 @@ public interface ClassAccessor<B>
BeanAccessor<B> newInstance();
/**
- * <p>
* Invokes the constructor with the parameter list represented by {@code arguments} on the wrapped class. Primitive
* types may be converted to wrapper types and vice versa to match the methods signature.
- * </p>
*
* @param arguments the list of arguments to invoke the constructor with. None of the {@code Argument} objects must
* be {@code null}. If you want to pass {@code null} to the constructor use
@@ -65,10 +59,8 @@ public interface ClassAccessor<B>
BeanAccessor<B> invokeConstructor( Argument<?>... arguments );
/**
- * <p>
* Invokes the constructor with the parameter list represented by {@code arguments} on the wrapped class. Invoking
* an exact constructor in this context means to not perform any type conversations during invocation.
- * </p>
*
* @param arguments the list of arguments to invoke the constructor with. None of the {@code Argument} objects must
* be {@code null}. If you want to pass {@code null} to the constructor use
@@ -86,9 +78,7 @@ public interface ClassAccessor<B>
// bean properties
/**
- * <p>
* Provides access to the {@link BeanProperties} defined by the wrapped class.
- * </p>
*
* @return the {@link BeanProperties} for the wrapped class.
*/
@@ -97,10 +87,8 @@ public interface ClassAccessor<B>
// static methods invocation
/**
- * <p>
* Invokes the method with name {@code methodName} on the wrapped class. Primitive types may be converted to wrapper
* types and vice versa to match the methods signature.
- * </p>
*
* @param methodName the name of the method to invoke. Must not be {@code null}!
* @return the {@link ArgumentsAccessor} for this method invocation.
@@ -108,10 +96,8 @@ public interface ClassAccessor<B>
ArgumentsAccessor invokeStatic( String methodName );
/**
- * <p>
* Invokes the method with name {@code methodName} on the wrapped class. Invoking an exact method in this context
* means to not perform any type conversations during invocation.
- * </p>
*
* @param methodName the name of the method to invoke. Must not be {@code null}!
* @return the {@link ArgumentsAccessor} for this method invocation.
Modified: commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassLoaderBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassLoaderBuilder.java?rev=1447413&r1=1447412&r2=1447413&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassLoaderBuilder.java (original)
+++ commons/sandbox/beanutils2/trunk/src/main/java/org/apache/commons/beanutils2/ClassLoaderBuilder.java Mon Feb 18 18:14:54 2013
@@ -20,18 +20,14 @@ package org.apache.commons.beanutils2;
*/
/**
- * <p>
* Allows to specify a {@link ClassLoader} for loading a class by name.
- * </p>
*/
public interface ClassLoaderBuilder
{
/**
- * <p>
* Use the class loader of the currently executing thread for loading the class. In other words use the class loader
* returned by {@code Thread.currentThread().getContextClassLoader()}.
- * </p>
*
* @return a {@link ClassAccessor} wrapping the loaded class.
* @throws BeanClassNotFoundException no class with the given could be found.
@@ -39,9 +35,7 @@ public interface ClassLoaderBuilder
ClassAccessor<?> loadWithThreadContextClassLoader();
/**
- * <p>
* Use the class loader that loaded {@code org.apache.commons.beanutils2.BeanUtils2} to load the class.
- * </p>
*
* @return a {@link ClassAccessor} wrapping the loaded class.
* @throws BeanClassNotFoundException no class with the given could be found.
@@ -49,9 +43,7 @@ public interface ClassLoaderBuilder
ClassAccessor<?> loadWithBeanUtilsClassLoader();
/**
- * <p>
* Use a custom {@link ClassLoader} for loading the class.
- * </p>
*
* @param classLoader the {@link ClassLoader} to load the class. Must not be {@code null}!
* @return a {@link ClassAccessor} wrapping the loaded class.