User: ara_e_w
Date: 02/05/26 13:29:52
Modified: modules/apache/src/xdoclet/modules/apache/struts Tag:
MODULE_REFACTORING_BRANCH
StrutsFormTagsHandler.java
Log:
xjavadoc javabeaninifiction refactoring
Revision Changes Path
No revision
No revision
1.1.2.8 +17 -17
xdoclet/modules/apache/src/xdoclet/modules/apache/struts/Attic/StrutsFormTagsHandler.java
Index: StrutsFormTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/struts/Attic/StrutsFormTagsHandler.java,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -w -r1.1.2.7 -r1.1.2.8
--- StrutsFormTagsHandler.java 15 May 2002 22:06:15 -0000 1.1.2.7
+++ StrutsFormTagsHandler.java 26 May 2002 20:29:52 -0000 1.1.2.8
@@ -33,7 +33,7 @@
* @author Dmitri Colebatch ([EMAIL PROTECTED])
* @created Oct 19, 2001
* @xdoclet:taghandler namespace="StrutsForm"
- * @version $Revision: 1.1.2.7 $
+ * @version $Revision: 1.1.2.8 $
*/
public class StrutsFormTagsHandler extends EjbTagsHandler
{
@@ -46,7 +46,7 @@
*/
public static String getStrutsFormClassFor(XClass clazz) throws XDocletException
{
- String packageName = clazz.containingPackage().name();
+ String packageName = clazz.getContainingPackage().getName();
packageName = choosePackage(packageName, null,
StrutsFormSubTask.SUBTASK_NAME);
return packageName + '.' + getStrutsFormClassName(clazz);
@@ -64,7 +64,7 @@
XTag currentTag = ((StrutsFormSubTask)
DocletContext.getInstance().getSubTaskBy(StrutsFormSubTask.SUBTASK_NAME)).getCurrentFormTag();
// check if there is a name parameter
- String name = currentTag.attributeValue("name");
+ String name = currentTag.getAttributeValue("name");
if (name == null) {
return getShortEjbNameFor(clazz) + "Form";
@@ -83,7 +83,7 @@
*/
public static boolean hasFormDefinition(XClass clazz) throws XDocletException
{
- return clazz.doc().hasTag("struts:form", false);
+ return clazz.getDoc().hasTag("struts:form", false);
}
/**
@@ -114,7 +114,7 @@
public String strutsFormName() throws XDocletException
{
XTag currentTag = ((StrutsFormSubTask)
getDocletContext().getSubTaskBy(StrutsFormSubTask.SUBTASK_NAME)).getCurrentFormTag();
- String formName = currentTag.attributeValue("name");
+ String formName = currentTag.getAttributeValue("name");
if (formName == null || formName.trim().length() == 0) {
return Introspector.decapitalize(getEjbNameFor(getCurrentClass()) +
"Form");
@@ -149,21 +149,21 @@
pushCurrentClass(currentClass);
if (log.isDebugEnabled()) {
- log.debug("-----CLASS=" + getCurrentClass().name() +
"----------------");
+ log.debug("-----CLASS=" + getCurrentClass().getName() +
"----------------");
}
- XMethod[] methods = getCurrentClass().methods();
+ XMethod[] methods = getCurrentClass().getMethods();
for (int j = 0; j < methods.length; j++) {
setCurrentMethod(methods[j]);
// we are interested in persistent methods only
- if (MethodTagsHandler.isGetter(getCurrentMethod().name()) &&
!foundFields.containsKey(getCurrentMethod().name())) {
+ if (MethodTagsHandler.isGetter(getCurrentMethod().getName()) &&
!foundFields.containsKey(getCurrentMethod().getName())) {
if (useMethodInForm(getCurrentMethod())) {
if (log.isDebugEnabled()) {
- log.debug("METHOD(I=" + getCurrentMethod().name());
+ log.debug("METHOD(I=" + getCurrentMethod().getName());
}
// Store that we found this field so we don't add it twice
- foundFields.put(getCurrentMethod().name(),
getCurrentMethod().name());
+ foundFields.put(getCurrentMethod().getName(),
getCurrentMethod().getName());
generate(template);
}
@@ -171,13 +171,13 @@
}
// Add super class info
- if
(getCurrentClass().superclass().qualifiedName().equals("java.lang.Object")) {
+ if
(getCurrentClass().getSuperclass().getQualifiedName().equals("java.lang.Object")) {
popCurrentClass();
break;
}
popCurrentClass();
- currentClass = currentClass.superclass();
+ currentClass = currentClass.getSuperclass();
} while (true);
if (log.isDebugEnabled()) {
@@ -197,7 +197,7 @@
{
// check for include-all
XTag currentTag = ((StrutsFormSubTask)
getDocletContext().getSubTaskBy(StrutsFormSubTask.SUBTASK_NAME)).getCurrentFormTag();
- String value = currentTag.attributeValue("include-all");
+ String value = currentTag.getAttributeValue("include-all");
// by default, include all is true
if (value == null || value.trim().length() == 0) {
@@ -209,18 +209,18 @@
}
// include all pk fields unless include-pk="false"
- value = currentTag.attributeValue("include-pk");
+ value = currentTag.getAttributeValue("include-pk");
if (PersistentTagsHandler.isPkField(method) && ((value == null) || (value
!= null && !value.equals("false")))) {
return true;
}
// check for explicit inclusion
- XTag[] mTags = method.doc().tags("struts:form-field");
+ XTag[] mTags = method.getDoc().getTags("struts:form-field");
for (int i = 0; i < mTags.length; i++) {
XTag mTag = mTags[i];
- String pname = mTag.attributeValue("form-name");
- String fname = mTag.attributeValue("name");
+ String pname = mTag.getAttributeValue("form-name");
+ String fname = mTag.getAttributeValue("name");
if (pname != null && fname != null && fname.equals(pname)) {
return true;
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel