Return-Path:
X-Original-To: apmail-struts-commits-archive@minotaur.apache.org
Delivered-To: apmail-struts-commits-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 2539718115
for ;
Fri, 24 Jul 2015 18:27:51 +0000 (UTC)
Received: (qmail 60431 invoked by uid 500); 24 Jul 2015 18:27:48 -0000
Delivered-To: apmail-struts-commits-archive@struts.apache.org
Received: (qmail 60359 invoked by uid 500); 24 Jul 2015 18:27:48 -0000
Mailing-List: contact commits-help@struts.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@struts.apache.org
Delivered-To: mailing list commits@struts.apache.org
Received: (qmail 60287 invoked by uid 99); 24 Jul 2015 18:27:48 -0000
Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org)
(140.211.11.23)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2015 18:27:48 +0000
Received: by git1-us-west.apache.org (ASF Mail Server at
git1-us-west.apache.org, from userid 33)
id 1C8F1E056D; Fri, 24 Jul 2015 18:27:48 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: jogep@apache.org
To: commits@struts.apache.org
Date: Fri, 24 Jul 2015 18:27:59 -0000
Message-Id: <657bd9348e8b4cae9115b249395c0e60@git.apache.org>
In-Reply-To:
References:
X-Mailer: ASF-Git Admin Mailer
Subject: [14/15] struts git commit: WW-4531- Improve javadoc to be compatible
with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
index 1c84b31..c946d70 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
@@ -344,6 +344,7 @@ public class XWorkConverter extends DefaultTypeConverter {
* Looks for a TypeConverter in the default mappings.
*
* @param className name of the class the TypeConverter must handle
+ * @param isPrimitive is primitive?
* @return a TypeConverter to handle the specified class or null if none can be found
*/
public TypeConverter lookup(String className, boolean isPrimitive) {
@@ -521,10 +522,11 @@ public class XWorkConverter extends DefaultTypeConverter {
/**
* Looks for converter mappings for the specified class, traversing up its class hierarchy and interfaces and adding
* any additional mappings it may find. Mappings lower in the hierarchy have priority over those higher in the
- * hierarcy.
+ * hierarchy.
*
* @param clazz the class to look for converter mappings for
* @return the converter mappings
+ * @throws Exception in case of any errors
*/
protected Map buildConverterMapping(Class clazz) throws Exception {
Map mapping = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java b/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
index eeece95..3dc59dc 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java
@@ -61,7 +61,7 @@ public class ConversionDescription {
/**
* Creates an ConversionDescription with the specified property name.
*
- * @param property
+ * @param property property
*/
public ConversionDescription(String property) {
this.property = property;
@@ -90,10 +90,7 @@ public class ConversionDescription {
}
/**
- * Sets the rule prefix for COLLECTION_PREFIX or MAP_PREFIX key.
- * Defaults to en empty String.
- *
- * @param rule
+ * @param rule the rule prefix for COLLECTION_PREFIX or MAP_PREFIX key. Defaults to en empty String.
*/
public void setRule(String rule) {
if (rule != null && rule.length() > 0) {
@@ -167,7 +164,7 @@ public class ConversionDescription {
/**
* Returns the fullQualifiedClassName attribute is used to create the special conversion.properties
file name.
*
- * @return fullQualifiedClassName
+ * @return full qualified class name
*/
public String getFullQualifiedClassName() {
return fullQualifiedClassName;
@@ -176,7 +173,7 @@ public class ConversionDescription {
/**
* The fullQualifiedClassName attribute is used to create the special conversion.properties
file name.
*
- * @param fullQualifiedClassName
+ * @param fullQualifiedClassName a full qualified class name
*/
public void setFullQualifiedClassName(String fullQualifiedClassName) {
this.fullQualifiedClassName = fullQualifiedClassName;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java
index d33cb1d..4cc41a9 100644
--- a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java
@@ -11,6 +11,15 @@ public interface ActionFactory {
/**
* Builds action instance
+ *
+ * @param actionName name of the action
+ * @param namespace namespace for the action
+ * @param config action config
+ * @param extraContext extra context map
+ *
+ * @return action object
+ *
+ * @throws Exception in case of any errors
*/
Object buildAction(String actionName, String namespace, ActionConfig config, Map extraContext) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java
index 289eefe..81f1d4b 100644
--- a/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/factory/ConverterFactory.java
@@ -14,7 +14,10 @@ public interface ConverterFactory {
*
* @param converterClass to instantiate
* @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
+ *
* @return instance of converterClass with inject dependencies
+ *
+ * @throws Exception in case of any errors
*/
TypeConverter buildConverter(Class extends TypeConverter> converterClass, Map extraContext) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java
index 742e7ab..d12601c 100644
--- a/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/factory/InterceptorFactory.java
@@ -22,6 +22,10 @@ public interface InterceptorFactory {
* @param interceptorConfig the InterceptorConfig from the configuration
* @param interceptorRefParams a Map of params provided in the Interceptor reference in the
* Action mapping or InterceptorStack definition
+ *
+ * @return interceptor
+ *
+ * @throws ConfigurationException in case of any configuration errors
*/
Interceptor buildInterceptor(InterceptorConfig interceptorConfig, Map interceptorRefParams) throws ConfigurationException;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java
index 244f3ab..9fe8687 100644
--- a/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/factory/UnknownHandlerFactory.java
@@ -14,7 +14,10 @@ public interface UnknownHandlerFactory {
*
* @param unknownHandlerName name of unknown handler defined in struts.xml
* @param extraContext extra params
+ *
* @return instance of {@link com.opensymphony.xwork2.UnknownHandler} with injected dependencies
+ *
+ * @throws Exception in case of any errors
*/
UnknownHandler buildUnknownHandler(String unknownHandlerName, Map extraContext) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java
index bbaa36e..f0beaa3 100644
--- a/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/factory/ValidatorFactory.java
@@ -13,8 +13,12 @@ public interface ValidatorFactory {
* Build a Validator of the given type and set the parameters on it
*
* @param className the type of Validator to build
- * @param params property name -> value Map to set onto the Validator instance
+ * @param params property name -> value Map to set onto the Validator instance
* @param extraContext a Map of extra context which uses the same keys as the {@link com.opensymphony.xwork2.ActionContext}
+ *
+ * @return a validator instance
+ *
+ * @throws Exception in case of any errors
*/
Validator buildValidator(String className, Map params, Map extraContext) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/Container.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Container.java b/core/src/main/java/com/opensymphony/xwork2/inject/Container.java
index bca6032..8c3ea4b 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/Container.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/Container.java
@@ -20,15 +20,18 @@ import java.io.Serializable;
import java.util.Set;
/**
+ *
* Injects dependencies into constructors, methods and fields annotated with
* {@link Inject}. Immutable.
+ *
*
* When injecting a method or constructor, you can additionally annotate
* its parameters with {@link Inject} and specify a dependency name. When a
* parameter has no annotation, the container uses the name from the method or
* constructor's {@link Inject} annotation respectively.
+ *
*
- * For example:
+ *
For example:
*
*
* class Foo {
@@ -55,7 +58,7 @@ import java.util.Set;
* }
*
*
- * To create and inject an instance of {@code Foo}:
+ *
To create and inject an instance of {@code Foo}:
*
*
* Container c = ...;
@@ -74,23 +77,38 @@ public interface Container extends Serializable {
/**
* Injects dependencies into the fields and methods of an existing object.
+ *
+ * @param o object to inject
*/
void inject(Object o);
/**
* Creates and injects a new instance of type {@code implementation}.
+ *
+ * @param type
+ * @param implementation of dependency
+ * @return instance
*/
T inject(Class implementation);
/**
* Gets an instance of the given dependency which was declared in
* {@link com.opensymphony.xwork2.inject.ContainerBuilder}.
+ *
+ * @param type
+ * @param type of dependency
+ * @param name of dependency
+ * @return instance
*/
T getInstance(Class type, String name);
/**
* Convenience method. Equivalent to {@code getInstance(type,
* DEFAULT_NAME)}.
+ *
+ * @param type
+ * @param type of dependency
+ * @return instance
*/
T getInstance(Class type);
@@ -103,6 +121,8 @@ public interface Container extends Serializable {
/**
* Sets the scope strategy for the current thread.
+ *
+ * @param scopeStrategy scope strategy
*/
void setScopeStrategy(Scope.Strategy scopeStrategy);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java b/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java
index 064aac3..447a3d0 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java
@@ -100,6 +100,8 @@ public final class ContainerBuilder {
/**
* Ensures a key isn't already mapped.
+ *
+ * @param key the key to check
*/
private void checkKey(Key> key) {
if (factories.containsKey(key) && !allowDuplicates) {
@@ -110,6 +112,7 @@ public final class ContainerBuilder {
/**
* Maps a factory to a given dependency type and name.
*
+ * @param type
* @param type of dependency
* @param name of dependency
* @param factory creates objects to inject
@@ -146,6 +149,11 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, factory, scope)}.
*
+ * @param type
+ * @param type of dependency
+ * @param factory of dependency
+ * @param scope scope of injected instances
+ * @return a container builder
* @see #factory(Class, String, Factory, Scope)
*/
public ContainerBuilder factory(Class type, Factory extends T> factory, Scope scope) {
@@ -156,6 +164,11 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type, name, factory,
* Scope.PROTOTYPE)}.
*
+ * @param type
+ * @param type of dependency
+ * @param name of dependency
+ * @param factory of dependency
+ * @return a container builder
* @see #factory(Class, String, Factory, Scope)
*/
public ContainerBuilder factory(Class type, String name, Factory extends T> factory) {
@@ -166,6 +179,10 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, factory, Scope.PROTOTYPE)}.
*
+ * @param type
+ * @param type of dependency
+ * @param factory of dependency
+ * @return a container builder
* @see #factory(Class, String, Factory, Scope)
*/
public ContainerBuilder factory(Class type, Factory extends T> factory) {
@@ -176,6 +193,7 @@ public final class ContainerBuilder {
* Maps an implementation class to a given dependency type and name. Creates
* instances using the container, recursively injecting dependencies.
*
+ * @param type
* @param type of dependency
* @param name of dependency
* @param implementation class
@@ -225,6 +243,7 @@ public final class ContainerBuilder {
* is found.
*
*
+ * @param type
* @param type of dependency
* @param name of dependency
* @param implementation class
@@ -241,6 +260,10 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, implementation)}.
*
+ * @param type
+ * @param type of dependency
+ * @param implementation class
+ * @return this builder
* @see #factory(Class, String, Class)
*/
public ContainerBuilder factory(Class type, Class extends T> implementation) {
@@ -251,6 +274,9 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, type)}.
*
+ * @param type
+ * @param type of dependency
+ * @return this builder
* @see #factory(Class, String, Class)
*/
public ContainerBuilder factory(Class type) {
@@ -260,6 +286,10 @@ public final class ContainerBuilder {
/**
* Convenience method. Equivalent to {@code factory(type, name, type)}.
*
+ * @param type
+ * @param type of dependency
+ * @param name of dependency
+ * @return this builder
* @see #factory(Class, String, Class)
*/
public ContainerBuilder factory(Class type, String name) {
@@ -270,6 +300,11 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, implementation, scope)}.
*
+ * @param type
+ * @param type of dependency
+ * @param implementation class
+ * @param scope the scope
+ * @return this builder
* @see #factory(Class, String, Class, Scope)
*/
public ContainerBuilder factory(Class type, Class extends T> implementation, Scope scope) {
@@ -280,6 +315,10 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type,
* Container.DEFAULT_NAME, type, scope)}.
*
+ * @param type
+ * @param type of dependency
+ * @param scope the scope
+ * @return this builder
* @see #factory(Class, String, Class, Scope)
*/
public ContainerBuilder factory(Class type, Scope scope) {
@@ -290,6 +329,11 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code factory(type, name, type,
* scope)}.
*
+ * @param type
+ * @param type of dependency
+ * @param name of dependency
+ * @param scope the scope
+ * @return this builder
* @see #factory(Class, String, Class, Scope)
*/
public ContainerBuilder factory(Class type, String name, Scope scope) {
@@ -300,6 +344,10 @@ public final class ContainerBuilder {
* Convenience method. Equivalent to {@code alias(type, Container.DEFAULT_NAME,
* type)}.
*
+ * @param type
+ * @param type of dependency
+ * @param alias of dependency
+ * @return this builder
* @see #alias(Class, String, String)
*/
public ContainerBuilder alias(Class type, String alias) {
@@ -309,6 +357,7 @@ public final class ContainerBuilder {
/**
* Maps an existing factory to a new name.
*
+ * @param type
* @param type of dependency
* @param name of dependency
* @param alias of to the dependency
@@ -321,6 +370,10 @@ public final class ContainerBuilder {
/**
* Maps an existing dependency. All methods in this class ultimately funnel through
* here.
+ * @param type of key and alias
+ * @param key name of key
+ * @param aliasKey name of alias key
+ * @return this builder
*/
private ContainerBuilder alias(final Key key,
final Key aliasKey) {
@@ -337,6 +390,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, String value) {
return constant(String.class, name, value);
@@ -344,6 +400,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, int value) {
return constant(int.class, name, value);
@@ -351,6 +410,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, long value) {
return constant(long.class, name, value);
@@ -358,6 +420,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, boolean value) {
return constant(boolean.class, name, value);
@@ -365,6 +430,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value constant value
+ * @return this builder
*/
public ContainerBuilder constant(String name, double value) {
return constant(double.class, name, value);
@@ -372,6 +440,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, float value) {
return constant(float.class, name, value);
@@ -379,6 +450,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, short value) {
return constant(short.class, name, value);
@@ -386,6 +460,9 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, char value) {
return constant(char.class, name, value);
@@ -393,6 +470,9 @@ public final class ContainerBuilder {
/**
* Maps a class to the given name.
+ * @param name name
+ * @param value value
+ * @return this builder
*/
public ContainerBuilder constant(String name, Class value) {
return constant(Class.class, name, value);
@@ -400,6 +480,10 @@ public final class ContainerBuilder {
/**
* Maps an enum to the given name.
+ * @param name name
+ * @param value type
+ * @param value value
+ * @return this builder
*/
public > ContainerBuilder constant(String name, E value) {
return constant(value.getDeclaringClass(), name, value);
@@ -407,6 +491,10 @@ public final class ContainerBuilder {
/**
* Maps a constant value to the given type and name.
+ * @param type type of class
+ * @param name name
+ * @param value value
+ * @return this builder
*/
private ContainerBuilder constant(final Class type, final String name, final T value) {
InternalFactory factory = new InternalFactory() {
@@ -434,6 +522,7 @@ public final class ContainerBuilder {
* into the given classes.
*
* @param types for which static members will be injected
+ * @return this builder
*/
public ContainerBuilder injectStatics(Class>... types) {
staticInjections.addAll(Arrays.asList(types));
@@ -441,7 +530,9 @@ public final class ContainerBuilder {
}
/**
- * Returns true if this builder contains a mapping for the given type and
+ * @param type type of class
+ * @param name name of class
+ * @return true if this builder contains a mapping for the given type and
* name.
*/
public boolean contains(Class> type, String name) {
@@ -451,6 +542,8 @@ public final class ContainerBuilder {
/**
* Convenience method. Equivalent to {@code contains(type,
* Container.DEFAULT_NAME)}.
+ * @param type type of class
+ * @return true if this builder contains a mapping for the given type.
*/
public boolean contains(Class> type) {
return contains(type, Container.DEFAULT_NAME);
@@ -464,6 +557,7 @@ public final class ContainerBuilder {
* now. If false, the container will lazily load singletons. Eager loading
* is appropriate for production use while lazy loading can speed
* development.
+ * @return this builder
* @throws IllegalStateException if called more than once
*/
public Container create(boolean loadSingletons) {
@@ -510,7 +604,7 @@ public final class ContainerBuilder {
/**
* Contributes factories to the given builder.
*
- * @param builder
+ * @param builder the container builder
*/
void build(ContainerBuilder builder);
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/Context.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Context.java b/core/src/main/java/com/opensymphony/xwork2/inject/Context.java
index 233b5e4..7e5d03d 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/Context.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/Context.java
@@ -26,12 +26,12 @@ import java.lang.reflect.Member;
public interface Context {
/**
- * Gets the {@link Container}.
+ * @return the {@link Container}.
*/
Container getContainer();
/**
- * Gets the current scope strategy. See {@link
+ * @return the current scope strategy. See {@link
* Container#setScopeStrategy(Scope.Strategy)}.
*
* @throws IllegalStateException if no strategy has been set
@@ -39,19 +39,19 @@ public interface Context {
Scope.Strategy getScopeStrategy();
/**
- * Gets the field, method or constructor which is being injected. Returns
+ * @return the field, method or constructor which is being injected. Returns
* {@code null} if the object currently being constructed is pre-loaded as
* a singleton or requested from {@link Container#getInstance(Class)}.
*/
Member getMember();
/**
- * Gets the type of the field or parameter which is being injected.
+ * @return the type of the field or parameter which is being injected.
*/
Class> getType();
/**
- * Gets the name of the injection specified by {@link Inject#value()}.
+ * @return the name of the injection specified by {@link Inject#value()}.
*/
String getName();
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java b/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java
index 610d2bb..2e45761 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/Inject.java
@@ -26,6 +26,7 @@ import java.lang.annotation.Target;
/**
* Annotates members and parameters which should have their value[s]
* injected.
+ *
*
* @author crazybob@google.com (Bob Lee)
*/
@@ -34,12 +35,12 @@ import java.lang.annotation.Target;
public @interface Inject {
/**
- * Dependency name. Defaults to {@link Container#DEFAULT_NAME}.
+ * @return Dependency name. Defaults to {@link Container#DEFAULT_NAME}.
*/
String value() default DEFAULT_NAME;
/**
- * Whether or not injection is required. Applicable only to methods and
+ * @return Whether or not injection is required. Applicable only to methods and
* fields (not constructors or parameters).
*/
boolean required() default true;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java
index f42829f..ed0e104 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java
@@ -183,6 +183,12 @@ public enum Scope {
/**
* Wraps factory with scoping logic.
+ *
+ * @param type type of object
+ * @param name name of object
+ * @param factory factory
+ *
+ * @return the factory for the given type and name
*/
abstract InternalFactory extends T> scopeFactory(
Class type, String name, InternalFactory extends T> factory);
@@ -198,6 +204,15 @@ public enum Scope {
/**
* Finds an object for the given type and name in the request scope.
* Creates a new object if necessary using the given factory.
+ *
+ * @param generic type
+ * @param type type of object
+ * @param name name of object
+ * @param factory factory
+ *
+ * @return the object for the given type and name in the request scope
+ *
+ * @throws Exception in case of any error
*/
T findInRequest(Class type, String name,
Callable extends T> factory) throws Exception;
@@ -205,6 +220,15 @@ public enum Scope {
/**
* Finds an object for the given type and name in the session scope.
* Creates a new object if necessary using the given factory.
+ *
+ * @param generic type
+ * @param type type of object
+ * @param name name of object
+ * @param factory factory
+ *
+ * @return the object for the given type and name in the session scope
+ *
+ * @throws Exception in case of any error
*/
T findInSession(Class type, String name,
Callable extends T> factory) throws Exception;
@@ -212,6 +236,15 @@ public enum Scope {
/**
* Finds an object for the given type and name in the wizard scope.
* Creates a new object if necessary using the given factory.
+ *
+ * @param generic type
+ * @param type type of object
+ * @param name name of object
+ * @param factory factory
+ *
+ * @return the object for the given type and name in the wizard scope
+ *
+ * @throws Exception in case of any error
*/
T findInWizard(Class type, String name,
Callable extends T> factory) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java b/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java
index 31a9447..fb708ca 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/Scoped.java
@@ -31,7 +31,7 @@ import java.lang.annotation.Target;
public @interface Scoped {
/**
- * Scope.
+ * @return scope
*/
Scope value();
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java b/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java
index 82e8af1..87df2af 100644
--- a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java
+++ b/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java
@@ -55,6 +55,10 @@ public abstract class ReferenceCache extends ReferenceMap {
* #put(Object, Object)}. Invoked by getter if value isn't already cached.
* Must not return {@code null}. This method will not be called again until
* the garbage collector reclaims the returned value.
+ *
+ * @param key the key
+ *
+ * @return returned value
*/
protected abstract V create(K key);
@@ -105,6 +109,9 @@ public abstract class ReferenceCache extends ReferenceMap {
* value, put it in the map, and return it.
*
*
+ * @param key the key
+ * @return return new created value
+ *
* @throws NullPointerException if {@link #create(Object)} returns null.
* @throws java.util.concurrent.CancellationException if the creation is
* cancelled. See {@link #cancel()}.
@@ -156,6 +163,14 @@ public abstract class ReferenceCache extends ReferenceMap {
/**
* Returns a {@code ReferenceCache} delegating to the specified {@code
* function}. The specified function must not return {@code null}.
+ *
+ * @param type of key
+ * @param type of value
+ * @param function function
+ * @param keyReferenceType key reference type
+ * @param valueReferenceType value reference type
+ *
+ * @return reference cache
*/
public static ReferenceCache of(
ReferenceType keyReferenceType,
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
index d3e62e5..93bae6d 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ChainingInterceptor.java
@@ -41,9 +41,9 @@ import java.util.*;
*
*
* Note: It is important to remember that this interceptor does nothing if there are no objects already on the stack.
- *
This means two things:
- *
One, you can safely apply it to all your actions without any worry of adverse affects.
- *
Two, it is up to you to ensure an object exists in the stack prior to invoking this action. The most typical way this is done
+ *
This means two things:
+ *
One, you can safely apply it to all your actions without any worry of adverse affects.
+ *
Two, it is up to you to ensure an object exists in the stack prior to invoking this action. The most typical way this is done
* is through the use of the chain result type, which combines with this interceptor to make up the action
* chaining feature.
*
@@ -51,19 +51,21 @@ import java.util.*;
*
* Note: By default Errors, Field errors and Message aren't copied during chaining, to change the behaviour you can specify
* the below three constants in struts.properties or struts.xml:
+ *
+ *
*
* - struts.xwork.chaining.copyErrors - set to true to copy Action Errors
* - struts.xwork.chaining.copyFieldErrors - set to true to copy Field Errors
* - struts.xwork.chaining.copyMessages - set to true to copy Action Messages
*
- *
*
*
* Example:
+ *
+ *
*
* <constant name="struts.xwork.chaining.copyErrors" value="true"/>
*
- *
*
*
* Note: By default actionErrors and actionMessages are excluded when copping object's properties.
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
index f0308d1..c71eade 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
@@ -30,12 +30,14 @@ import java.lang.reflect.Method;
* An interceptor that makes sure there are not validation errors before allowing the interceptor chain to continue.
* This interceptor does not perform any validation.
*
+ *
*
* This interceptor does nothing if the name of the method being invoked is specified in the excludeMethods
* parameter. excludeMethods accepts a comma-delimited list of method names. For example, requests to
* foo!input.action and foo!back.action will be skipped by this interceptor if you set the
* excludeMethods parameter to "input, back".
*
+ *
*
* Note: As this method extends off MethodFilterInterceptor, it is capable of
* deciding if it is applicable only to selective methods in the action class. This is done by adding param tags
@@ -44,18 +46,24 @@ import java.lang.reflect.Method;
* all methods for both parameters.
* See {@link MethodFilterInterceptor} for more info.
*
+ *
+ *
* This interceptor also supports the following interfaces which can implemented by actions:
+ *
+ *
*
* - ValidationAware - implemented by ActionSupport class
* - ValidationWorkflowAware - allows changing result name programmatically
* - ValidationErrorAware - notifies action about errors and also allow change result name
*
*
+ *
* You can also use InputConfig annotation to change result name returned when validation errors occurred.
+ *
*
*
*
- * Interceptor parameters:
+ * Interceptor parameters:
*
*
*
@@ -64,15 +72,15 @@ import java.lang.reflect.Method;
*
*
*
- * Extending the interceptor:
+ * Extending the interceptor:
*
*
*
- * There are no known extension points for this interceptor.
+ * There are no known extension points for this interceptor.
*
*
*
- * Example code:
+ * Example code:
*
*
*
@@ -143,6 +151,7 @@ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor {
* Intercept {@link ActionInvocation} and returns a inputResultName
* when action / field errors is found registered.
*
+ * @param invocation the action invocation
* @return String result name
*/
@Override
@@ -169,6 +178,11 @@ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor {
/**
* Process {@link ValidationWorkflowAware} interface
+ *
+ * @param action action object
+ * @param currentResultName current result name
+ *
+ * @return result name
*/
private String processValidationWorkflowAware(final Object action, final String currentResultName) {
String resultName = currentResultName;
@@ -182,6 +196,13 @@ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor {
/**
* Process {@link InputConfig} annotation applied to method
+ * @param action action object
+ * @param method method
+ * @param currentResultName current result name
+ *
+ * @return result name
+ *
+ * @throws Exception in case of any errors
*/
protected String processInputConfig(final Object action, final String method, final String currentResultName) throws Exception {
String resultName = currentResultName;
@@ -200,7 +221,13 @@ public class DefaultWorkflowInterceptor extends MethodFilterInterceptor {
}
/**
- * Notify action if it implements {@see ValidationErrorAware} interface
+ * Notify action if it implements {@link ValidationErrorAware} interface
+ *
+ * @param action action object
+ * @param currentResultName current result name
+ *
+ * @return result name
+ * @see ValidationErrorAware
*/
protected String processValidationErrorAware(final Object action, final String currentResultName) {
String resultName = currentResultName;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
index a273bb4..50ed889 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java
@@ -102,7 +102,7 @@ import java.util.Map;
*
*
* This second example will also log the exceptions using our own category
- * com.mycompany.app.unhandled at WARN level.
+ * com.mycompany.app.unhandled
at WARN level.
*
*
*
@@ -214,7 +214,7 @@ public class ExceptionMappingInterceptor extends AbstractInterceptor {
/**
* Handles the logging of the exception.
*
- * @param e the exception to log.
+ * @param e the exception to log.
*/
protected void handleLogging(Exception e) {
if (logCategory != null) {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
index 5ef3816..186e42e 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/I18nInterceptor.java
@@ -142,6 +142,8 @@ public class I18nInterceptor extends AbstractInterceptor {
* @param invocation the action invocation
* @param locale the locale to store
* @param storage the place to store this locale (like Storage.SESSSION.toString())
+ *
+ * @return the locale
*/
protected Locale storeLocale(ActionInvocation invocation, Locale locale, String storage) {
//save it in session
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java
index 3054a90..d87f23f 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java
@@ -143,7 +143,7 @@ import java.io.Serializable;
* Assuming the interceptor has the following properties
*
*
- *
+ *
*
* Interceptor |
* property |
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
index e48d3ea..c6d9131 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
@@ -24,7 +24,7 @@ import org.apache.logging.log4j.Logger;
*
*
* This interceptor logs the start and end of the execution an action (in English-only, not internationalized).
- *
+ *
* Note:: This interceptor will log at INFO level.
*
*
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
index 34b6920..c23933e 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.java
@@ -68,8 +68,6 @@ import java.util.Set;
* @see org.apache.struts2.interceptor.TokenSessionStoreInterceptor
* @see com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor
* @see com.opensymphony.xwork2.validator.ValidationInterceptor
- *
- * @version $Date$ $Id$
*/
public abstract class MethodFilterInterceptor extends AbstractInterceptor {
protected transient Logger log = LogManager.getLogger(getClass());
@@ -116,7 +114,7 @@ public abstract class MethodFilterInterceptor extends AbstractInterceptor {
*
* @param invocation the action invocation
* @return the result of invocation
- * @throws Exception
+ * @throws Exception in case of any errors
*/
protected abstract String doIntercept(ActionInvocation invocation) throws Exception;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
index 46767d5..d3c48a3 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterFilterInterceptor.java
@@ -63,7 +63,8 @@ import java.util.TreeMap;
* allowed: person.address
* defaultBlock: false
*
- *
+ *
+ *
* The parameters person.name, person.phoneNum etc would be blocked
* because 'person' is in the blocked list. However, person.address.street
* and person.address.city would be allowed because person.address is
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterNameAware.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterNameAware.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterNameAware.java
index 46ba188..ba623fd 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterNameAware.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ParameterNameAware.java
@@ -17,10 +17,12 @@ package com.opensymphony.xwork2.interceptor;
/**
*
+ *
* This interface is implemented by actions that want to declare acceptable parameters. Works in conjunction with {@link
- * ParametersInterceptor}. For example, actions may want to create a whitelist of parameters they will accept or a
- * blacklist of paramters they will reject to prevent clients from setting other unexpected (and possibly dangerous)
+ * ParametersInterceptor}. For example, actions may want to create a white list of parameters they will accept or a
+ * blacklist of parameters they will reject to prevent clients from setting other unexpected (and possibly dangerous)
* parameters.
+ *
*
*
* @author Bob Lee (crazybob@google.com)
@@ -31,7 +33,7 @@ public interface ParameterNameAware {
* Tests if the the action will accept the parameter with the given name.
*
* @param parameterName the parameter name
- * @return if accepted, false otherwise
+ * @return true if accepted, false otherwise
*/
boolean acceptableParameterName(String parameterName);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
index bbf8277..70516cd 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/PrefixMethodInvocationUtil.java
@@ -161,10 +161,12 @@ public class PrefixMethodInvocationUtil {
}
/**
+ *
* This method capitalized the first character of methodName
.
- *
+ *
* eg. capitalizeMethodName("someMethod");
will return "SomeMethod"
.
- *
+ *
+ *
* @param methodName the method name
* @return capitalized method name
*/
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java
index e381373..d8f84c5 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/ScopedModelDriven.java
@@ -23,7 +23,7 @@ import com.opensymphony.xwork2.ModelDriven;
public interface ScopedModelDriven extends ModelDriven {
/**
- * Sets the model
+ * @param model sets the model
*/
void setModel(T model);
@@ -34,7 +34,7 @@ public interface ScopedModelDriven extends ModelDriven {
void setScopeKey(String key);
/**
- * Gets the key under which the model is stored
+ * @return the key under which the model is stored
*/
String getScopeKey();
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
index 934dd54..914a2a1 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/StaticParametersInterceptor.java
@@ -112,7 +112,7 @@ public class StaticParametersInterceptor extends AbstractInterceptor {
* Overwrites already existing parameters from other sources.
* Static parameters are the successor over previously set parameters, if true.
*
- * @param value
+ * @param value enable overwrites of already existing parameters from other sources
*/
public void setOverwrite(String value) {
this.overwrite = BooleanUtils.toBoolean(value);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java
index 978a49a..13b0a74 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/After.java
@@ -36,7 +36,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
* Parameter |
* Required |
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java
index fb546de..abc2b51 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/Before.java
@@ -35,7 +35,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
* Parameter |
* Required |
@@ -51,7 +51,7 @@ import java.lang.annotation.Target;
*
*
*
- * Example code:
+ * Example code:
*
*
*
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java
index 44825bd..84e15fa 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/BeforeResult.java
@@ -35,7 +35,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
* Parameter |
* Required |
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java
index 33f7ab1..6ef8ee0 100644
--- a/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java
+++ b/core/src/main/java/com/opensymphony/xwork2/interceptor/annotations/InputConfig.java
@@ -37,7 +37,7 @@ import com.opensymphony.xwork2.Action;
* Annotation parameters:
*
*
- *
+ *
*
* Parameter |
* Required |
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java b/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java
index 605aaf2..f01261a 100644
--- a/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java
+++ b/core/src/main/java/com/opensymphony/xwork2/mock/MockObjectTypeDeterminer.java
@@ -37,10 +37,10 @@ public class MockObjectTypeDeterminer implements ObjectTypeDeterminer {
/**
- * @param keyClass
- * @param elementClass
- * @param keyProperty
- * @param shouldCreateIfNew
+ * @param keyClass key class
+ * @param elementClass element class
+ * @param keyProperty key property
+ * @param shouldCreateIfNew create if new
*/
public MockObjectTypeDeterminer(Class keyClass, Class elementClass,
String keyProperty, boolean shouldCreateIfNew) {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index 77f4a8b..f6f2ea8 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -168,8 +168,8 @@ public class OgnlUtil {
* Sets the properties on the object using the default context, defaulting to not throwing
* exceptions for problems setting the properties.
*
- * @param properties
- * @param o
+ * @param properties map of properties
+ * @param o object
*/
public void setProperties(Map properties, Object o) {
setProperties(properties, o, false);
@@ -226,7 +226,12 @@ public class OgnlUtil {
* Looks for the real target with the specified property given a root Object which may be a
* CompoundRoot.
*
+ * @param property the property
+ * @param context context map
+ * @param root compound root
+ *
* @return the real target or null if no object can be found with the specified property
+ * @throws OgnlException in case of ognl errors
*/
public Object getRealTarget(String property, Map context, Object root) throws OgnlException {
//special keyword, they must be cutting the stack
@@ -260,6 +265,13 @@ public class OgnlUtil {
/**
* Wrapper around Ognl.setValue() to handle type conversion for collection elements.
* Ideally, this should be handled by OGNL directly.
+ *
+ * @param name the name
+ * @param context context map
+ * @param root root
+ * @param value value
+ *
+ * @throws OgnlException in case of ognl errors
*/
public void setValue(String name, Map context, Object root, Object value) throws OgnlException {
setValue(name, context, root, value, true);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java b/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
index bc30d57..40e4b32 100644
--- a/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
@@ -36,6 +36,7 @@ import java.util.Map;
* Simple implementation of the ObjectFactory that makes use of Spring's application context if one has been configured,
* before falling back on the default mechanism of instantiating a new class using the class name.
*
+ *
*
* In order to use this class in your application, you will need to instantiate a copy of this class and set it as XWork's ObjectFactory
* before the xwork.xml file is parsed. In a servlet environment, this could be done using a ServletContextListener.
@@ -83,7 +84,7 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
/**
* Sets the autowiring strategy
*
- * @param autowireStrategy
+ * @param autowireStrategy the autowire strategy
*/
public void setAutowireStrategy(int autowireStrategy) {
switch (autowireStrategy) {
@@ -121,7 +122,9 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
* If the given context is assignable to AutowireCapbleBeanFactory or contains a parent or a factory that is, then
* set the autoWiringFactory appropriately.
*
- * @param context
+ * @param context the application context
+ *
+ * @return the bean factory
*/
protected AutowireCapableBeanFactory findAutoWiringBeanFactory(ApplicationContext context) {
if (context instanceof AutowireCapableBeanFactory) {
@@ -142,10 +145,10 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
* ObjectFactory}.
*
* @param beanName The name of the bean to look up in the application context
- * @param extraContext
+ * @param extraContext additional context parameters
* @return A bean from Spring or the result of calling the overridden
* method.
- * @throws Exception
+ * @throws Exception in case of any errors
*/
@Override
public Object buildBean(String beanName, Map extraContext, boolean injectInternal) throws Exception {
@@ -164,9 +167,10 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
}
/**
- * @param clazz
- * @param extraContext
- * @throws Exception
+ * @param clazz class of bean
+ * @param extraContext additional context parameters
+ * @return bean
+ * @throws Exception in case of any errors
*/
@Override
public Object buildBean(Class clazz, Map extraContext) throws Exception {
@@ -203,8 +207,10 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
}
/**
- * @param bean
- * @param autoWiringFactory
+ * @param bean the bean to be autowired
+ * @param autoWiringFactory the autowiring factory
+ *
+ * @return bean
*/
public Object autoWireBean(Object bean, AutowireCapableBeanFactory autoWiringFactory) {
if (autoWiringFactory != null) {
@@ -264,7 +270,7 @@ public class SpringObjectFactory extends ObjectFactory implements ApplicationCon
/**
* Enable / disable caching of classes loaded by Spring.
*
- * @param useClassCache
+ * @param useClassCache enable / disable class cache
*/
public void setUseClassCache(boolean useClassCache) {
this.useClassCache = useClassCache;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java b/core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
index f249f5f..ced7516 100644
--- a/core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
+++ b/core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
@@ -78,7 +78,8 @@ public class SpringProxyableObjectFactory extends SpringObjectFactory {
* autoWiringFactory
, so the application context should be either
* the original or a child context of the original.
*
- * @param context provided context.
+ * @param context provided context.
+ * @return the application context
*/
protected ApplicationContext getApplicationContext(Map context) {
return appContext;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java b/core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
index 7c11b85..1628678 100644
--- a/core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
+++ b/core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
@@ -33,7 +33,7 @@ import org.springframework.web.context.WebApplicationContext;
*
*
*
- * TODO: Describe the paramters for this Interceptor.
+ * TODO: Describe the parameters for this Interceptor.
*
*
*
@@ -50,11 +50,13 @@ import org.springframework.web.context.WebApplicationContext;
* </action>
*
*
- *
+ *
+ *
* Autowires action classes to Spring beans. The strategy for autowiring the beans can be configured
* by setting the parameter on the interceptor. Actions that need access to the ActionContext
* can implements the ApplicationContextAware
interface. The context will also be placed on
* the action context under the APPLICATION_CONTEXT attribute.
+ *
*
* @author Simon Stewart
* @author Eric Hauser
@@ -70,7 +72,7 @@ public class ActionAutowiringInterceptor extends AbstractInterceptor implements
private Integer autowireStrategy;
/**
- * @param autowireStrategy
+ * @param autowireStrategy the autowire strategy
*/
public void setAutowireStrategy(Integer autowireStrategy) {
this.autowireStrategy = autowireStrategy;
@@ -92,8 +94,8 @@ public class ActionAutowiringInterceptor extends AbstractInterceptor implements
* TODO: Should this check to see if the SpringObjectFactory
has already been configured instead of instantiating a new one? Or is there a good reason for the interceptor to have it's own factory?
*
*
- * @param invocation
- * @throws Exception
+ * @param invocation the action invocation
+ * @throws Exception in case of any errors
*/
@Override public String intercept(ActionInvocation invocation) throws Exception {
if (!initialized) {
@@ -107,7 +109,7 @@ public class ActionAutowiringInterceptor extends AbstractInterceptor implements
factory = new SpringObjectFactory();
factory.setApplicationContext(getApplicationContext());
if (autowireStrategy != null) {
- factory.setAutowireStrategy(autowireStrategy.intValue());
+ factory.setAutowireStrategy(autowireStrategy);
}
}
initialized = true;
@@ -123,15 +125,15 @@ public class ActionAutowiringInterceptor extends AbstractInterceptor implements
}
/**
- * @param applicationContext
- * @throws BeansException
+ * @param applicationContext the application context
+ * @throws BeansException in case of errors
*/
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
context = applicationContext;
}
/**
- * @return context
+ * @return the application context
*/
protected ApplicationContext getApplicationContext() {
return context;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
index 08cae03..2144bc8 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java
@@ -28,8 +28,9 @@ import java.util.regex.Pattern;
/**
* AnnotationUtils
- *
+ *
* Various utility methods dealing with annotations
+ *
*
* @author Rainer Hermanns
* @author Zsolt Szasz, zsolt at lorecraft dot com
@@ -46,9 +47,9 @@ public class AnnotationUtils {
/**
* Adds all fields with the specified Annotation of class clazz and its superclasses to allFields
*
- * @param annotationClass
- * @param clazz
- * @param allFields
+ * @param annotationClass the {@link Annotation}s to find
+ * @param clazz The {@link Class} to inspect
+ * @param allFields list of all fields
*/
public static void addAllFields(Class extends Annotation> annotationClass, Class clazz, List allFields) {
@@ -70,9 +71,9 @@ public class AnnotationUtils {
/**
* Adds all methods with the specified Annotation of class clazz and its superclasses to allFields
*
- * @param annotationClass
- * @param clazz
- * @param allMethods
+ * @param annotationClass the {@link Annotation}s to find
+ * @param clazz The {@link Class} to inspect
+ * @param allMethods list of all methods
*/
public static void addAllMethods(Class extends Annotation> annotationClass, Class clazz, List allMethods) {
@@ -93,8 +94,8 @@ public class AnnotationUtils {
/**
*
- * @param clazz
- * @param allInterfaces
+ * @param clazz The {@link Class} to inspect
+ * @param allInterfaces list of all interfaces
*/
public static void addAllInterfaces(Class clazz, List allInterfaces) {
if (clazz == null) {
@@ -133,6 +134,9 @@ public class AnnotationUtils {
/**
* Varargs version of AnnotatedElement.isAnnotationPresent()
+ * @param annotatedElement element to check
+ * @param annotation the {@link Annotation}s to find
+ * @return true is element is annotated by one of the annotation
* @see AnnotatedElement
*/
public static boolean isAnnotatedBy(AnnotatedElement annotatedElement, Class extends Annotation>... annotation) {
@@ -175,6 +179,7 @@ public class AnnotationUtils {
* Returns the annotation on the given class or the package of the class. This searchs up the
* class hierarchy and the package hierarchy for the closest match.
*
+ * @param class type
* @param clazz The class to search for the annotation.
* @param annotationClass The Class of the annotation.
* @return The annotation or null.
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java b/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
index 46cfe9f..84877d2 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/ClassLoaderUtil.java
@@ -22,8 +22,11 @@ import java.util.*;
/**
+ *
* This class is extremely useful for loading resources and classes in a fault tolerant manner
* that works across different applications servers.
+ *
+ *
*
* It has come out of many months of frustrating use of multiple application servers at Atlassian,
* please don't change things unless you're sure they're not going to break in one server or another!
@@ -32,11 +35,16 @@ import java.util.*;
public class ClassLoaderUtil {
/**
+ *
* Load all resources with a given name, potentially aggregating all results
* from the searched classloaders. If no results are found, the resource name
* is prepended by '/' and tried again.
+ *
*
+ *
* This method will try to load the resources using the following methods (in order):
+ *
+ *
*
* - From Thread.currentThread().getContextClassLoader()
*
- From ClassLoaderUtil.class.getClassLoader()
@@ -45,6 +53,11 @@ public class ClassLoaderUtil {
*
* @param resourceName The name of the resources to load
* @param callingClass The Class object of the calling object
+ * @param aggregate aggregate
+ *
+ * @return all resources found
+ *
+ * @throws IOException in case of IO errors
*/
public static Iterator getResources(String resourceName, Class callingClass, boolean aggregate) throws IOException {
@@ -85,6 +98,8 @@ public class ClassLoaderUtil {
*
* @param resourceName The name of the resource to load
* @param callingClass The Class object of the calling object
+ *
+ * @return the resource
*/
public static URL getResource(String resourceName, Class callingClass) {
URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
@@ -115,6 +130,7 @@ public class ClassLoaderUtil {
*
* @param resourceName The name of the resource to load
* @param callingClass The Class object of the calling object
+ * @return resource as a stream
*/
public static InputStream getResourceAsStream(String resourceName, Class callingClass) {
URL url = getResource(resourceName, callingClass);
@@ -144,6 +160,7 @@ public class ClassLoaderUtil {
*
* @param className The name of the class to load
* @param callingClass The Class object of the calling object
+ * @return class with for the given name
* @throws ClassNotFoundException If the class cannot be found anywhere.
*/
public static Class loadClass(String className, Class callingClass) throws ClassNotFoundException {
@@ -172,6 +189,8 @@ public class ClassLoaderUtil {
/**
* Prints the classloader hierarchy from a given classloader - useful for debugging.
+ *
+ * @param cl the class loader
*/
public static void printClassLoader(ClassLoader cl) {
System.out.println("ClassLoaderUtils.printClassLoader(cl = " + cl + ")");
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java b/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
index 5743885..45eeaf3 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/ClassPathFinder.java
@@ -32,8 +32,6 @@ import java.util.Vector;
* for files whose names match the given pattern. The filename is tested
* using the given implementation of {@link com.opensymphony.xwork2.util.PatternMatcher} by default it
* uses {@link com.opensymphony.xwork2.util.WildcardHelper}
- *
- * @version $Rev$ $Date$
*/
public class ClassPathFinder {
@@ -52,15 +50,14 @@ public class ClassPathFinder {
private Vector compared = new Vector<>();
/**
- * retrieves the pattern in use
+ * @return the pattern in use
*/
public String getPattern() {
return pattern;
}
/**
- * sets the String pattern for comparing filenames
- * @param pattern
+ * @param pattern the String pattern for comparing filenames
*/
public void setPattern(String pattern) {
this.pattern = pattern;
@@ -71,7 +68,7 @@ public class ClassPathFinder {
* who's name matches the pattern set by setPattern(String). The classpath is
* searched recursively, so use with caution.
*
- * @return Vector containing matching filenames
+ * @return Vector<String> containing matching filenames
*/
public Vector findMatches() {
Vector matches = new Vector<>();
@@ -151,8 +148,7 @@ public class ClassPathFinder {
}
/**
- * sets the PatternMatcher implementation to use when comparing filenames
- * @param patternMatcher
+ * @param patternMatcher the PatternMatcher implementation to use when comparing filenames
*/
public void setPatternMatcher(PatternMatcher patternMatcher) {
this.patternMatcher = patternMatcher;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java b/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java
index 0ab63b6..1511da7 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/CreateIfNull.java
@@ -34,7 +34,7 @@ import java.lang.annotation.Target;
*
Annotation parameters:
*
*
- *
+ *
*
*
* Parameter |
@@ -58,7 +58,7 @@ import java.lang.annotation.Target;
*
*
* @CreateIfNull( value = true )
- * private List users;
+ * private List<User> users;
*
*
*
@@ -69,8 +69,7 @@ import java.lang.annotation.Target;
public @interface CreateIfNull {
/**
- * The CreateIfNull value.
- * Defaults to true.
+ * @return The CreateIfNull value. Defaults to true.
*/
boolean value() default true;
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java b/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
index 1b1ea2d..1b38373 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/DomHelper.java
@@ -59,6 +59,8 @@ public class DomHelper {
* using the {@link #getLocationObject(Element)} method.
*
* @param inputSource the inputSource to read the document from
+ *
+ * @return the W3C Document
*/
public static Document parse(InputSource inputSource) {
return parse(inputSource, null);
@@ -72,6 +74,8 @@ public class DomHelper {
*
* @param inputSource the inputSource to read the document from
* @param dtdMappings a map of DTD names and public ids
+ *
+ * @return the W3C Document
*/
public static Document parse(InputSource inputSource, Map dtdMappings) {
@@ -164,6 +168,7 @@ public class DomHelper {
/**
* Construct a new instance of this DOMBuilder.
+ * @param factory the SAX transformer factory
*/
public DOMBuilder(SAXTransformerFactory factory) {
this(factory, null);
@@ -171,6 +176,8 @@ public class DomHelper {
/**
* Constructs a new instance that appends nodes to the given parent node.
+ *
+ * @param parentNode the parent node
*/
public DOMBuilder(Node parentNode) {
this(null, parentNode);
@@ -178,6 +185,9 @@ public class DomHelper {
/**
* Construct a new instance of this DOMBuilder.
+ *
+ * @param factory the SAX transformer factory
+ * @param parentNode the parent node
*/
public DOMBuilder(SAXTransformerFactory factory, Node parentNode) {
this.factory = factory == null? FACTORY: factory;
@@ -205,6 +215,8 @@ public class DomHelper {
/**
* Return the newly built Document.
+ *
+ * @return the W3C Document
*/
public Document getDocument() {
if (this.result == null || this.result.getNode() == null) {
@@ -269,6 +281,7 @@ public class DomHelper {
/**
* Create a filter that is chained to another handler.
* @param next the next handler in the chain.
+ * @param dtdMappings map of DTD mappings
*/
public StartHandler(ContentHandler next, Map dtdMappings) {
nextHandler = next;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/Element.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/Element.java b/core/src/main/java/com/opensymphony/xwork2/util/Element.java
index de66d1f..1b41f57 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/Element.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/Element.java
@@ -34,7 +34,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
*
* Parameter |
@@ -59,10 +59,10 @@ import java.lang.annotation.Target;
*
* // The key property for User objects within the users collection is the userName
attribute.
* @Element( value = com.acme.User )
- * private Map userMap;
+ * private Map<Long, User> userMap;
*
* @Element( value = com.acme.User )
- * public List userList;
+ * public List<User> userList;
*
*
*
@@ -73,8 +73,7 @@ import java.lang.annotation.Target;
public @interface Element {
/**
- * The Element value.
- * Defaults to java.lang.Object.class.
+ * @return The Element value. Defaults to java.lang.Object.class.
*/
Class value() default java.lang.Object.class;
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/Key.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/Key.java b/core/src/main/java/com/opensymphony/xwork2/util/Key.java
index 5d2fb6d..0448b3f 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/Key.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/Key.java
@@ -34,7 +34,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
*
* Parameter |
@@ -59,7 +59,7 @@ import java.lang.annotation.Target;
*
* // The key property for User objects within the users collection is the userName
attribute.
* @Key( value = java.lang.Long.class )
- * private Map userMap;
+ * private Map<Long, User> userMap;
*
*
*
@@ -70,8 +70,7 @@ import java.lang.annotation.Target;
public @interface Key {
/**
- * The Key value.
- * Defaults to java.lang.Object.class.
+ * @return The Key value. Defaults to java.lang.Object.class.
*/
Class value() default java.lang.Object.class;
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java b/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java
index 396af47..1a702ba 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/KeyProperty.java
@@ -35,7 +35,7 @@ import java.lang.annotation.Target;
* Annotation parameters:
*
*
- *
+ *
*
*
* Parameter |
@@ -60,7 +60,7 @@ import java.lang.annotation.Target;
*
* // The key property for User objects within the users collection is the userName
attribute.
* @KeyProperty( value = "userName" )
- * protected List users = null;
+ * protected List<User> users = null;
*
*
*
@@ -72,8 +72,7 @@ import java.lang.annotation.Target;
public @interface KeyProperty {
/**
- * The KeyProperty value.
- * Defaults to the id attribute.
+ * @return The KeyProperty value. Defaults to the id attribute.
*/
String value() default "id";
}