mcconnell 2002/12/20 19:29:33 Modified: meta/src/java/org/apache/avalon/meta/model LoggingDirective.java Profile.java Log: Addition of convinience constructor. Revision Changes Path 1.2 +14 -1 avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/LoggingDirective.java Index: LoggingDirective.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/LoggingDirective.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LoggingDirective.java 24 Nov 2002 12:58:28 -0000 1.1 +++ LoggingDirective.java 21 Dec 2002 03:29:33 -0000 1.2 @@ -52,6 +52,9 @@ import java.io.Serializable; +import org.apache.avalon.meta.info.Type; + + /** * Description of a set of categories. * @@ -84,6 +87,16 @@ public LoggingDirective( final String name ) { this( name, null, null, new Category[ 0 ] ); + } + + /** + * Create a LoggingDirective instance. + * + * @param name the base category name + */ + public LoggingDirective( final Type type ) + { + this( type.getInfo().getName(), null, null, new Category[ 0 ] ); } /** 1.8 +11 -12 avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java Index: Profile.java =================================================================== RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Profile.java 20 Dec 2002 11:56:37 -0000 1.7 +++ Profile.java 21 Dec 2002 03:29:33 -0000 1.8 @@ -325,6 +325,16 @@ } /** + * Return the type info for component. + * + * @return the info for component type. + */ + public Type getType() + { + return m_type; + } + + /** * Return the name of component metadata instance. * * @return the name of the component. @@ -345,16 +355,6 @@ } /** - * Return the type info for component. - * - * @return the info for component type. - */ - public Type getType() - { - return m_type; - } - - /** * Return the context directive for the profile. * * @return the ContextDirective for the profile. @@ -399,7 +399,6 @@ */ public String toString() { - return "[" + getName() + "]"; }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>