|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.exceptions.report.utils.JavadocUtils
public final class JavadocUtils
Provides functions for manipulating Javadoc related information.
Method Summary | |
---|---|
static String |
constructRelativePath(String dirPath1, String dirPath2) Constructs a relative path between the two directories. |
static String |
expandJavadocUrl(String javadocRoot, String className) Creates the URL to a Javadoc document for the given class. |
static String[] |
split(String dirPath) Splits the given path in an array containing the names of the files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String expandJavadocUrl(String javadocRoot, String className) throws NullPointerException, IllegalArgumentException
javadocRoot
- the root directory of the Javadoc documentation. This should be a relative URL but it may also be absolute (the method does not bother). If this value is the empty string, not path delimiter (
/
) will be prepended. The method replaces all occurrences of
\
with
/
.
className
- the fully qualified name of the class the URL should point to.
NullPointerException
- if any of the arguments is
null
.
IllegalArgumentException
- if the name of the class is the empty string.
public static String constructRelativePath(String dirPath1, String dirPath2) throws NullPointerException, IllegalArgumentException
The method assumes that both paths are directories. If at least one of the paths is a file, the result is incorrect. The method has no bullet-proof means to check if the path is directing to a file or not since the file is not required to exist.
dirPath1
- the path to one directory.
dirPath2
- the path to another directory.
NullPointerException
- if any of the arguments is
null
.
IllegalArgumentException
- if any of the paths is the empty string.
public static String[] split(String dirPath)
If a null
value is provided for the path argument, the empty array is returned.
dirPath
- the path to split.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |