donaldp 2002/10/03 22:52:28
Modified: info/src/java/org/apache/avalon/framework/info
FeatureDescriptor.java
Log:
Added method to help when building strings representing features.
Revision Changes Path
1.6 +20 -1
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/FeatureDescriptor.java
Index: FeatureDescriptor.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/info/FeatureDescriptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FeatureDescriptor.java 29 Sep 2002 04:13:47 -0000 1.5
+++ FeatureDescriptor.java 4 Oct 2002 05:52:28 -0000 1.6
@@ -8,6 +8,7 @@
package org.apache.avalon.framework.info;
import java.io.Serializable;
+import java.util.Arrays;
/**
* This is the Abstract class for all feature descriptors.
@@ -68,5 +69,23 @@
}
}
return null;
+ }
+
+ /**
+ * Helper method to convert attributes into a
+ * string representation.
+ *
+ * @return attributes converted into a string representation
+ */
+ protected final String attributesToString()
+ {
+ if( 0 == m_attributes.length )
+ {
+ return "";
+ }
+ else
+ {
+ return String.valueOf( Arrays.asList( m_attributes ) );
+ }
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>