User: pathoss
Date: 02/05/15 01:53:40
Modified: core/src/xdoclet Tag: MODULE_REFACTORING_BRANCH
ConfigParamIntrospector.java
Log:
Cleanup.
Revision Changes Path
No revision
No revision
1.7.2.4 +8 -19 xdoclet/core/src/xdoclet/ConfigParamIntrospector.java
Index: ConfigParamIntrospector.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/ConfigParamIntrospector.java,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -u -w -r1.7.2.3 -r1.7.2.4
--- ConfigParamIntrospector.java 12 May 2002 11:58:00 -0000 1.7.2.3
+++ ConfigParamIntrospector.java 15 May 2002 08:53:40 -0000 1.7.2.4
@@ -16,12 +16,11 @@
import xdoclet.util.LogUtil;
/**
- * Used by DocletTask. Creates and returns a HashMap of config params for a
- * DocletTask or SubTask.
+ * Used by DocletTask. Creates and returns a HashMap of config params for a
DocletTask or SubTask.
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Jan 19, 2002
- * @version $Revision: 1.7.2.3 $
+ * @version $Revision: 1.7.2.4 $
*/
public final class ConfigParamIntrospector
{
@@ -35,7 +34,7 @@
*/
public static String capitalize(String name)
{
- if (name == null || name.length() == 0) {
+ if (name == null || name.trim().length() == 0) {
return name;
}
@@ -92,7 +91,6 @@
return getterMethod;
}
-
/**
* Describe what the method does
*
@@ -104,7 +102,6 @@
fillConfigParamsHashMapUsingReflectionFor(task, configs, "");
}
-
/**
* Describe what the method does
*
@@ -116,10 +113,8 @@
fillConfigParamsHashMapUsingReflectionFor(subtask, configs,
subtask.getSubTaskName() + '.');
}
-
/**
- * Extract the name of a property from a method name - subtracting a given
- * prefix.
+ * Extract the name of a property from a method name - subtracting a given
prefix.
*
* @param methodName The method name
* @param prefix The prefix
@@ -132,11 +127,9 @@
return Introspector.decapitalize(methodName.substring(start));
}
-
/**
- * Uses reflection to find javabean properties of an object (should have
- * both setter and getter and fills the hashtable with key="name of the
- * property" and value="the value of that property".
+ * Uses reflection to find javabean properties of an object (should have both
setter and getter and fills the
+ * hashtable with key="name of the property" and value="the value of that
property".
*
* @param javabean
* @param configs
@@ -166,6 +159,7 @@
Modifier.isPublic(method.getModifiers()) &&
Void.TYPE.equals(returnType) &&
args.length == 1) {
+
String propertyName = getPropertyName(name, "set");
String capitalPropertyName = capitalize(propertyName);
Method getterMethod = null;
@@ -183,7 +177,6 @@
if (log.isDebugEnabled()) {
log.error("Getter method not found.");
}
-
continue;
}
@@ -197,21 +190,18 @@
if (log.isDebugEnabled()) {
log.error("IllegalAccessException", e);
}
-
continue;
}
catch (IllegalArgumentException e) {
if (log.isDebugEnabled()) {
log.error("IllegalArgumentException", e);
}
-
continue;
}
catch (InvocationTargetException e) {
if (log.isDebugEnabled()) {
log.error("InvocationTargetException", e);
}
-
continue;
}
@@ -249,8 +239,7 @@
private final static class NullObject implements Serializable
{
/**
- * Simply equals if is of type NullObject (NullObject treated like a
- * singleton).
+ * Simply equals if is of type NullObject (NullObject treated like a
singleton).
*
* @param obj
* @return true if argument is a NullObject
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel