de.smartics.analysis.javadoc
Class JavadocUtils

Package class diagram package JavadocUtils
java.lang.Object
  extended by de.smartics.analysis.javadoc.JavadocUtils

public final class JavadocUtils
     
     
extends Object

Utilities to communicate with the Javadoc tool.

Author:
Robert Reiner

Field Summary
static String PARAM_NAME_PACKAGENAMES
          The name of the parameter to pass the list of package names as arguments to the Javadoc tool.
static String PARAM_NAME_SOURCEFILES
          The name of the parameter to pass the list of source files as arguments to the Javadoc tool.
 
Method Summary
static Console executeJavadocParser(String programName, Map<String,String> javadocArguments)
          Runs the Javadoc tool.
static Console executeJavadocParser(String programName, String[] args)
          Runs the Javadoc tool.
static int executeJavadocParser(String programName, String defaultDocletClassName, Map<String,String> javadocArguments, JavadocMessageLogger logger)
          Runs the Javadoc tool.
static String[] generateJavadocParserArguments(Map<String,String> javadocArguments)
          Flattens the arguments found in the properties to an array to be passed to the Javadoc tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_NAME_SOURCEFILES

public static final String PARAM_NAME_SOURCEFILES
The name of the parameter to pass the list of source files as arguments to the Javadoc tool.

The value of this constant is "sourcefiles".

Constant Field Value:
"sourcefiles"

PARAM_NAME_PACKAGENAMES

public static final String PARAM_NAME_PACKAGENAMES
The name of the parameter to pass the list of package names as arguments to the Javadoc tool.

The value of this constant is "packagenames".

Constant Field Value:
"packagenames"
Method Detail

executeJavadocParser

public static Console executeJavadocParser(String programName,
                                           Map<String,String> javadocArguments)
Runs the Javadoc tool. Convenience method that calls generateJavadocParserArguments(Map) and executeJavadocParser(String, String[]).

Parameters:
programName - the name of the program that runs the Javadoc collector. This string will be passed to the Javadoc tool and is used for logging purpose.
javadocArguments - the arguments to pass to the Javadoc tool. The properties are not validated and any property found here is set as an argument to the Javadoc tool. The property names usually start with a dash. If not, the value may be adjusted to meet certain criteria and the dash will be added prior to passing it to the Javadoc tool.
Returns:
the information provided by the Javadoc tool to the console.

executeJavadocParser

public static Console executeJavadocParser(String programName,
                                           String[] args)
Runs the Javadoc tool.

Parameters:
programName - the name of the program that runs the Javadoc collector. This string will be passed to the Javadoc tool and is used for logging purpose.
args - the arguments to the Javadoc too.
See Also:
executeJavadocParser(String, Map)
Returns:
the information provided by the Javadoc tool to the console.

executeJavadocParser

public static int executeJavadocParser(String programName,
                                       String defaultDocletClassName,
                                       Map<String,String> javadocArguments,
                                       JavadocMessageLogger logger)
Runs the Javadoc tool.

Parameters:
programName - the name of the program that runs the Javadoc collector. This string will be passed to the Javadoc tool and is used for logging purpose.
defaultDocletClassName - the doclet to run.
javadocArguments - the arguments to pass to the Javadoc tool. The properties are not validated and any property found here is set as an argument to the Javadoc tool. The property names usually start with a dash. If not, the value may be adjusted to meet certain criteria and the dash will be added prior to passing it to the Javadoc tool.
logger - the logger to print error, warn and notice messages to.
Returns:
the return code uttered by the Javadoc tool.

generateJavadocParserArguments

public static String[] generateJavadocParserArguments(Map<String,String> javadocArguments)
Flattens the arguments found in the properties to an array to be passed to the Javadoc tool. If the key does not already start with a '-', it will be prepended.

Parameters:
javadocArguments - the arguments to pass to the Javadoc tool. The properties are not validated and any property found here is set as an argument to the Javadoc tool. The property names usually start with a dash. If not, the value may be adjusted to meet certain criteria and the dash will be added prior to passing it to the Javadoc tool.
Returns:
the properties found in javadocArguments as array.


Copyright © 2008-2011 Kronseder & Reiner GmbH - smartics. All Rights Reserved.