org.apache.avalon.meta.info.builder.tags
Class AbstractTag

java.lang.Object
  extended byorg.apache.avalon.meta.info.builder.tags.AbstractTag
Direct Known Subclasses:
AttributeTag, ContextTag, DependencyTag, ExtensionTag, LoggerTag, SchemaTag, ServicesTag, ServiceTag, StageTag, TypeTag

public class AbstractTag
extends Object

A doclet tag representing the name of the Type.

Version:
$Revision: 1.3 $ $Date: 2003/08/19 03:24:02 $
Author:
Avalon Development Team

Field Summary
static String TYPE_PARAM
          The dependency tag type parameter name.
static String VERSION_PARAM
          The dependency tag version parameter name.
 
Constructor Summary
AbstractTag(JavaClass clazz)
          Class constructor.
 
Method Summary
protected  JavaClass getJavaClass()
          Return the javadoc class descriptor.
protected  JavaMethod[] getLifecycleMethods(String methodName, String parameterType)
          Retrieves all methods in the inheritance graph with specified name and one parameter of specified type.
protected  String getNamedParameter(DocletTag tag, String name)
          Retrieve specified named parameter from tag.
protected  String getNamedParameter(DocletTag tag, String name, String defaultValue)
          Retrieve specified named parameter from tag.
 String getNS()
          Return the user defined namespace for avalon tags.
 String getNSD()
          Return the user defined namespace for avalon tags including the standard namespace delimiter.
protected  String resolveType(String type)
          Resolve the specified type.
protected  Version resolveVersion(String type)
          Resolve a version form the supplied string.
protected  Version resolveVersion(String version, String type)
          Resolve a version form the supplied string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_PARAM

public static final String TYPE_PARAM
The dependency tag type parameter name.

See Also:
Constant Field Values

VERSION_PARAM

public static final String VERSION_PARAM
The dependency tag version parameter name.

See Also:
Constant Field Values
Constructor Detail

AbstractTag

public AbstractTag(JavaClass clazz)
Class constructor.

Parameters:
clazz - the javadoc class descriptor
Method Detail

getJavaClass

protected JavaClass getJavaClass()
Return the javadoc class descriptor.

Returns:
the javadoc class descriptor

getNS

public String getNS()
             throws IllegalArgumentException
Return the user defined namespace for avalon tags. The value returned is established by the javadoc tag 'avalon.namespace [namespace-value]' where [namespace-value] is a string representing the namespace identifier.

Returns:
the namespace tag used to represent the avalon.meta tag space
Throws:
IllegalArgumentException - if the namespace tag is declared by does not contain a value

getNSD

public String getNSD()
              throws IllegalArgumentException
Return the user defined namespace for avalon tags including the standard namespace delimiter. The value returned is established by the javadoc tag 'avalon.namespace [namespace-value]' where [namespace-value] is a string representing the namespace identifier with the namespace delimiter appended.

Returns:
the namespace tag with delimeter
Throws:
IllegalArgumentException - if the namespace tag is declared by does not contain a value

getNamedParameter

protected String getNamedParameter(DocletTag tag,
                                   String name,
                                   String defaultValue)
Retrieve specified named parameter from tag. If the parameter does not exist then return specified default value.

Parameters:
tag - the tag
name - the name of parameter
defaultValue - the default value
Returns:
the value of named parameter

getNamedParameter

protected String getNamedParameter(DocletTag tag,
                                   String name)
Retrieve specified named parameter from tag. If the parameter does not exist then throw an exception.

Parameters:
tag - the tag
name - the name of parameter
Returns:
the value of named parameter

resolveVersion

protected Version resolveVersion(String version,
                                 String type)
Resolve a version form the supplied string.

Parameters:
version - the explicit version
type - the unresolved type in the classname:version format
Returns:
the version or null if no version specified

resolveVersion

protected Version resolveVersion(String type)
Resolve a version form the supplied string.

Parameters:
type - the unresolved type
Returns:
the version or null if no version specified

resolveType

protected String resolveType(String type)
Resolve the specified type. Resolving essentially means finding the fully qualified name of a class from just it's short name.

Parameters:
type - the unresolved type classname
Returns:
the resolved type classname

getLifecycleMethods

protected JavaMethod[] getLifecycleMethods(String methodName,
                                           String parameterType)
Retrieves all methods in the inheritance graph with specified name and one parameter of specified type. The methods must also return void.

Parameters:
methodName - the name of the methods
parameterType - the class name of parameter
Returns:
an array of such methods


Copyright © Apache Software Foundation. All Rights Reserved.