You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/23 08:06:42 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc GroupArgument.java
donaldp 01/12/22 23:06:42
Added: proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc
GroupArgument.java
Log:
Made GroupArgument a top level class.
Revision Changes Path
1.1 jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/GroupArgument.java
Index: GroupArgument.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs.javadoc;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class GroupArgument
{
private ArrayList m_packages = new ArrayList( 3 );
private Html m_title;
public void setPackages( final String src )
{
final StringTokenizer tok = new StringTokenizer( src, "," );
while( tok.hasMoreTokens() )
{
final String p = tok.nextToken();
final PackageName pn = new PackageName();
pn.setName( p );
addPackage( pn );
}
}
public void setTitle( final String src )
{
final Html h = new Html();
h.addText( src );
addTitle( h );
}
public String getPackages()
{
final StringBuffer p = new StringBuffer();
for( int i = 0; i < m_packages.size(); i++ )
{
if( i > 0 )
{
p.append( ":" );
}
p.append( m_packages.get( i ).toString() );
}
return p.toString();
}
public String getTitle()
{
return m_title != null ? m_title.getText() : null;
}
public void addPackage( final PackageName pn )
{
m_packages.add( pn );
}
public void addTitle( final Html text )
{
m_title = text;
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>