public class JavaCodeTransform extends Object implements Serializable
htmlFilter
|__
ongoingMultiLineCommentFilter -> uriFilter
|__
inlineCommentFilter
|__
beginMultiLineCommentFilter -> ongoingMultiLineCommentFilter
|__
stringFilter
|__
keywordFilter
|__
uriFilter
|__
jxrFilter
|__
importFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENT_END
end comment delimiter
|
static String |
COMMENT_START
start comment delimiter
|
static String |
JAVADOC_COMMENT_END
end javadoc comment delimiter
|
static String |
JAVADOC_COMMENT_START
start javadoc comment delimiter
|
static boolean |
LINE_NUMBERS
show line numbers
|
static String |
RESERVED_WORD_END
end reserved word delimiter
|
static String |
RESERVED_WORD_START
start reserved word delimiter
|
static String |
STRING_END
end String delimiter
|
static String |
STRING_START
start String delimiter
|
static String |
STYLESHEET_FILENAME
stylesheet file name
|
static char[] |
VALID_URI_CHARS
Specify the only characters that are allowed in a URI besides alpha and
numeric characters.
|
static String[] |
VALID_URI_SCHEMES
Description of the Field
|
| Constructor and Description |
|---|
JavaCodeTransform(PackageManager packageManager)
Constructor for the JavaCodeTransform object
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendFooter(PrintWriter out,
String bottom)
Gets the footer attribute of the JavaCodeTransform object
|
void |
appendHeader(PrintWriter out)
Gets the header attribute of the JavaCodeTransform object
|
String |
getCurrentFilename()
Get the current filename
|
String |
getDestfile()
The current destination file being written
|
String |
getPackageRoot()
From the current file, determine the package root based on the current
path.
|
String |
getRevision()
The current revision of the CVS module
|
String |
getSourceDirectory()
The current source directory being read from.
|
String |
getSourcefile()
The current source file being read
|
void |
setCurrentFilename(String filename)
Set the current filename
|
String |
syntaxHighlight(String line)
Now different method of seeing if at end of input stream, closes inputs
stream at end.
|
void |
transform(Reader sourceReader,
Writer destWriter,
Locale locale,
String inputEncoding,
String outputEncoding,
String javadocLinkDir,
String revision,
String bottom)
This is the public method for doing all transforms of code.
|
void |
transform(String sourcefile,
String destfile,
Locale locale,
String inputEncoding,
String outputEncoding,
String javadocLinkDir,
String revision,
String bottom)
This is the public method for doing all transforms of code.
|
String |
uriFilter(String line)
Given a line of text, search for URIs and make href's out of them
|
String |
xrLine(String line,
String packageName)
Highlight the package in this line.
|
String |
xrLine(String line,
String packageName,
ClassType classType)
Cross Reference the given line with JXR returning the new content.
|
public static final boolean LINE_NUMBERS
public static final String COMMENT_START
public static final String COMMENT_END
public static final String JAVADOC_COMMENT_START
public static final String JAVADOC_COMMENT_END
public static final String STRING_START
public static final String STRING_END
public static final String RESERVED_WORD_START
public static final String RESERVED_WORD_END
public static final String STYLESHEET_FILENAME
public static final String[] VALID_URI_SCHEMES
public static final char[] VALID_URI_CHARS
public JavaCodeTransform(PackageManager packageManager)
packageManager - PackageManager for this projectpublic final String syntaxHighlight(String line)
line - Stringpublic void appendHeader(PrintWriter out)
out - the writer where the header is appended topublic final void appendFooter(PrintWriter out, String bottom)
out - the writer where the header is appended tobottom - the bottom textpublic final void transform(Reader sourceReader, Writer destWriter, Locale locale, String inputEncoding, String outputEncoding, String javadocLinkDir, String revision, String bottom) throws IOException
sourceReader - ReaderdestWriter - Writerlocale - StringinputEncoding - StringoutputEncoding - StringjavadocLinkDir - Stringrevision - Stringbottom - stringIOExceptionpublic final void transform(String sourcefile, String destfile, Locale locale, String inputEncoding, String outputEncoding, String javadocLinkDir, String revision, String bottom) throws IOException
sourcefile - Stringdestfile - Stringlocale - StringinputEncoding - StringoutputEncoding - StringjavadocLinkDir - Stringrevision - Stringbottom - TODOIOExceptionpublic final String getCurrentFilename()
public final void setCurrentFilename(String filename)
filename - Stringpublic final String getPackageRoot()
public final String uriFilter(String line)
line - Stringpublic final String getRevision()
public final String getSourcefile()
public final String getDestfile()
public final String getSourceDirectory()
public final String xrLine(String line, String packageName, ClassType classType)
line - StringpackageName - StringclassType - ClassTypeCopyright © 2002–2013 The Apache Software Foundation. All rights reserved.