de.smartics.analysis.javadoc.conf
Class ConfigUtils

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

public final class ConfigUtils
     
     
extends Object

This class provides utilities to discover source files.

Author:
Robert Reiner

Method Summary
static void checkCollectionValueProvided(StringBuilder buffer, Collection<?> value, String message)
          Checks that the Collection value is provided.
static void checkStringValueProvided(StringBuilder buffer, String value, String message)
          Checks that the String value is provided.
static void checkValueProvided(StringBuilder buffer, Object value, String message)
          Checks that the Object value is provided.
static String discoverSourceDirectory(String classRootDirectoryName)
          Dispatches the given name and tries to find a source directory for it.
static Collection<String> discoverSourceJars(Collection<String> classRootDirectoryNames)
          Checks each name if it references a library and if this is the case tries to find a source archive for the class archive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

discoverSourceJars

public static Collection<String> discoverSourceJars(Collection<String> classRootDirectoryNames)
Checks each name if it references a library and if this is the case tries to find a source archive for the class archive.

Parameters:
classRootDirectoryNames - the root directory names for the class archives (may be directories or files).
Returns:
the collection of source archives found for the given class archives.

discoverSourceDirectory

public static String discoverSourceDirectory(String classRootDirectoryName)
                                      throws NullPointerException
Dispatches the given name and tries to find a source directory for it.

Parameters:
classRootDirectoryName - the name that references an archive with classes.
Returns:
the name of an existing source archive or null if no such archive has been found.
Throws:
NullPointerException - if the argument is null.

checkStringValueProvided

public static void checkStringValueProvided(StringBuilder buffer,
                                            String value,
                                            String message)
Checks that the String value is provided. If not, the given message will be appended to the given buffer.

Parameters:
buffer - the buffer to append the message to, if value is blank.
value - the value that must not be blank.
message - the validation failure message.

checkValueProvided

public static void checkValueProvided(StringBuilder buffer,
                                      Object value,
                                      String message)
Checks that the Object value is provided. If not, the given message will be appended to the given buffer.

Parameters:
buffer - the buffer to append the message to, if value is null.
value - the value that must not be null.
message - the validation failure message.

checkCollectionValueProvided

public static void checkCollectionValueProvided(StringBuilder buffer,
                                                Collection<?> value,
                                                String message)
Checks that the Collection value is provided. If not, the given message will be appended to the given buffer.

Parameters:
buffer - the buffer to append the message to, if value is null or empty.
value - the value that must not be null or empty.
message - the validation failure message.


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