bloritsch 2003/07/21 11:59:23
Modified: meta/tools/src/java/org/apache/avalon/meta/info/builder/tags
TypeTag.java
Log:
Update the TypeTag to follow the results of the vote. I.e. it is now called
@avalon.component
Revision Changes Path
1.6 +28 -12
avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/TypeTag.java
Index: TypeTag.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/tools/src/java/org/apache/avalon/meta/info/builder/tags/TypeTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TypeTag.java 15 Jul 2003 22:45:06 -0000 1.5
+++ TypeTag.java 21 Jul 2003 18:59:23 -0000 1.6
@@ -65,8 +65,8 @@
import com.thoughtworks.qdox.model.JavaClass;
/**
- * <p>A doclet tag the declares a a [EMAIL PROTECTED] Type} descriptor using the
- * <code>&avalon.type</code> or <code>&avalon.component</code>
+ * <p>A doclet tag the declares a a [EMAIL PROTECTED] Type} descriptor using the
+ * <code>&avalon.type</code> or <code>&avalon.component</code>
* javadoc tag. The &avalon.component is senonomouse with &avalon.type.
* The &avalon.type tag recognizes the following attributes:<p>
*
@@ -79,12 +79,12 @@
* <td>The name of the component type.</td></tr>
* <tr bgcolor="white" class="TableRowColor">
* <td>version</td><td>optional</td>
- * <td>A version identifier in the format [major].[minor].[micro].
+ * <td>A version identifier in the format [major].[minor].[micro].
* If not supplied the version 1.0.0 will be assumed.</td></tr>
* <tr bgcolor="white" class="TableRowColor">
* <td>lifestyle</td><td>optional</td>
- * <td>The component implementation lifestyle - one of "singleton",
- * "thread", "pooled", or "transient". If not supplied "transient"
+ * <td>The component implementation lifestyle - one of "singleton",
+ * "thread", "pooled", or "transient". If not supplied "transient"
* is assumed.</td></tr>
* </table>
*
@@ -96,7 +96,7 @@
/**
* Javadoc tag key for the type tag.
*/
- public static final String KEY = "type";
+ public static final String KEY = "component";
/**
* The name parameter
@@ -123,7 +123,7 @@
}
/**
- * Return the value of the Avalon 'type' tag.
+ * Return the value of the Avalon 'component' tag.
* @return the name of the component type
* @exception IllegalArgumentException if the name tag does not contain a value
*/
@@ -134,20 +134,36 @@
{
return null;
}
- final String name = getNamedParameter( tag, NAME_PARAM );
- final String lifestyle = getNamedParameter( tag, LIFESTYLE_PARAM, null );
- final Version version = Version.getVersion( getNamedParameter( tag,
VERSION_PARAM, "" ) );
+
+ final String name = getName( tag );
+ final Version version = getVersion( tag );
+ final String lifestyle = getLifestyle( tag );
final String type = getJavaClass().getFullyQualifiedName();
final Properties properties = new AttributeTag( getJavaClass()
).getProperties();
final InfoDescriptor info = new InfoDescriptor( name, type, version,
lifestyle, properties );
final ServiceDescriptor[] services = new ServicesTag( getJavaClass()
).getServices();
final CategoryDescriptor[] loggers = new LoggerTag( getJavaClass()
).getCategories();
- final DependencyDescriptor[] dependencies =
+ final DependencyDescriptor[] dependencies =
new DependencyTag( getJavaClass() ).getDependencies();
final StageDescriptor[] stages = new StageTag( getJavaClass() ).getStages();
final ExtensionDescriptor[] extensions = new ExtensionTag( getJavaClass()
).getExtensions();
final ContextDescriptor context = new ContextTag( getJavaClass()
).getContext();
return new Type( info, loggers, context, services, dependencies, stages,
extensions, null );
+ }
+
+ private String getName(DocletTag tag)
+ {
+ return getNamedParameter( tag, NAME_PARAM );
+ }
+
+ private String getLifestyle(DocletTag tag)
+ {
+ return getNamedParameter( tag, LIFESTYLE_PARAM, null );
+ }
+
+ private Version getVersion(DocletTag tag)
+ {
+ return Version.getVersion( getNamedParameter( tag, VERSION_PARAM, "" ) );
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]