public class JavaSourceProcessor extends BaseSourceProcessor
attributeNamePattern, bndContentDirPattern, emptyCollectionPattern, javaSourceInsideJSPTagPattern, languageKeyPattern, PORTAL_MAX_DIR_LEVEL, portalSource, principalExceptionPattern, sessionKeyPattern, sourceFormatterArgs, taglibSessionKeyPattern
Constructor and Description |
---|
JavaSourceProcessor() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
applyDiamondOperator(java.lang.String content) |
protected static java.lang.String |
checkAnnotationParameterProperties(java.lang.String content,
java.lang.String annotation) |
protected void |
checkAnnotationParameters(java.lang.String fileName,
java.lang.String javaTermName,
java.lang.String annotation) |
protected void |
checkFinderCacheInterfaceMethod(java.lang.String fileName,
java.lang.String content) |
protected void |
checkLogLevel(java.lang.String content,
java.lang.String fileName) |
protected void |
checkModulesFile(java.lang.String fileName,
java.lang.String absolutePath,
java.lang.String packagePath,
java.lang.String content) |
protected void |
checkOSGIComponents(java.lang.String fileName,
java.lang.String absolutePath,
java.lang.String content) |
protected void |
checkRegexPattern(java.lang.String regexPattern,
java.lang.String fileName,
int lineCount) |
protected void |
checkSystemEventAnnotations(java.lang.String content,
java.lang.String fileName) |
protected void |
checkUnprocessedExceptions(java.lang.String content,
java.io.File file,
java.lang.String packagePath,
java.lang.String fileName) |
protected void |
checkXMLSecurity(java.lang.String fileName,
java.lang.String content,
boolean isRunOutsidePortalExclusion) |
protected java.lang.String |
doFormat(java.io.File file,
java.lang.String fileName,
java.lang.String absolutePath,
java.lang.String content) |
protected java.util.List<java.lang.String> |
doGetFileNames() |
protected java.lang.String |
fixDataAccessConnection(java.lang.String className,
java.lang.String content) |
protected java.lang.String |
fixIfClause(java.lang.String ifClause,
java.lang.String line,
int delta) |
protected java.lang.String |
fixIncorrectEmptyLineBeforeCloseCurlyBrace(java.lang.String content,
java.lang.String fileName) |
protected java.lang.String |
fixSystemExceptions(java.lang.String content) |
protected java.lang.String |
formatAnnotations(java.lang.String fileName,
java.lang.String javaTermName,
java.lang.String content,
java.lang.String indent) |
protected java.lang.String |
formatClassLine(java.lang.String content) |
protected java.lang.String |
formatIfClause(java.lang.String ifClause) |
protected java.lang.String |
formatIfClause(java.lang.String ifClause,
java.lang.String fileName,
int lineCount) |
protected java.lang.String |
formatJava(java.lang.String fileName,
java.lang.String absolutePath,
java.lang.String content) |
protected java.lang.String |
getCombinedLinesContent(java.lang.String content,
java.util.regex.Pattern pattern) |
protected java.lang.String |
getCombinedLinesContent(java.lang.String content,
java.lang.String fileName,
java.lang.String line,
java.lang.String trimmedLine,
int lineLength,
int lineCount,
java.lang.String previousLine,
java.lang.String linePart,
int tabDiff,
boolean addToPreviousLine,
boolean extraSpace,
int numNextLinesRemoveLeadingTab) |
protected java.lang.String |
getCombinedLinesContent(java.lang.String content,
java.lang.String fileName,
java.lang.String absolutePath,
java.lang.String line,
java.lang.String trimmedLine,
int lineLength,
int lineCount,
java.lang.String previousLine,
int lineTabCount,
int previousLineTabCount) |
protected java.lang.String |
getFormattedClassLine(java.lang.String indent,
java.lang.String classLine) |
protected int |
getIfClauseLineBreakPos(java.lang.String line) |
protected java.util.List<java.lang.String> |
getImportedExceptionClassNames(com.thoughtworks.qdox.JavaDocBuilder javaDocBuilder) |
java.lang.String[] |
getIncludes() |
protected int |
getIncorrectLineBreakPos(java.lang.String line,
java.lang.String previousLine) |
protected int |
getLineLength(java.lang.String line) |
protected int |
getLineStartPos(java.lang.String content,
int lineCount) |
protected java.lang.String |
getModuleServicePackagePath(java.lang.String fileName) |
protected java.lang.String |
getNextLine(java.lang.String content,
int lineCount) |
protected java.util.Collection<java.lang.String> |
getPluginJavaFiles() |
protected java.util.Collection<java.lang.String> |
getPortalJavaFiles() |
protected java.lang.String |
getTruncateLongLinesContent(java.lang.String content,
java.lang.String line,
java.lang.String trimmedLine,
int lineCount) |
protected boolean |
hasGeneratedTag(java.lang.String content) |
protected boolean |
isAnnotationParameter(java.lang.String content,
java.lang.String line) |
protected boolean |
isValidJavaParameter(java.lang.String javaParameter) |
protected java.lang.String |
sortExceptions(java.lang.String line) |
checkEmptyCollection, checkIfClauseParentheses, checkInefficientStringMethods, checkLanguageKeys, checkPrincipalException, checkResourceUtil, checkStringBundler, fixCompatClassImports, fixCopyright, fixIncorrectParameterTypeForLanguageUtil, fixSessionKey, format, format, format, formatIncorrectSyntax, formatJavaTerms, formatTagAttributeType, formatWhitespace, formatWhitespace, getAbsolutePath, getAnnotationsExclusions, getBNDFileLanguageProperties, getCompatClassNamesMap, getContent, getCustomCopyright, getErrorMessages, getFile, getFileNames, getFileNames, getFileNames, getFileNames, getFirstSourceMismatchException, getImmutableFieldTypes, getLanguageKeys, getLeadingTabCount, getMainReleaseVersion, getModifiedFileNames, getModuleLanguageProperties, getProperty, getPropertyList, getRunOutsidePortalExclusionPaths, hasMissingParentheses, hasRedundantParentheses, hasRedundantParentheses, isAttributName, isExcludedFile, isExcludedFile, isExcludedFile, isExcludedPath, isModulesFile, postFormat, processErrorMessage, processFormattedFile, replacePrimitiveWrapperInstantiation, setSourceFormatterArgs, sortAttributes, sortHTMLAttributes, stripQuotes, stripRedundantParentheses, trimContent, trimLine
public java.lang.String[] getIncludes()
protected static java.lang.String checkAnnotationParameterProperties(java.lang.String content, java.lang.String annotation)
protected java.lang.String applyDiamondOperator(java.lang.String content)
protected void checkAnnotationParameters(java.lang.String fileName, java.lang.String javaTermName, java.lang.String annotation)
protected void checkFinderCacheInterfaceMethod(java.lang.String fileName, java.lang.String content)
protected void checkLogLevel(java.lang.String content, java.lang.String fileName)
protected void checkModulesFile(java.lang.String fileName, java.lang.String absolutePath, java.lang.String packagePath, java.lang.String content)
protected void checkOSGIComponents(java.lang.String fileName, java.lang.String absolutePath, java.lang.String content)
protected void checkRegexPattern(java.lang.String regexPattern, java.lang.String fileName, int lineCount)
protected void checkSystemEventAnnotations(java.lang.String content, java.lang.String fileName) throws java.lang.Exception
java.lang.Exception
protected void checkUnprocessedExceptions(java.lang.String content, java.io.File file, java.lang.String packagePath, java.lang.String fileName) throws java.io.IOException
java.io.IOException
protected void checkXMLSecurity(java.lang.String fileName, java.lang.String content, boolean isRunOutsidePortalExclusion)
protected java.lang.String doFormat(java.io.File file, java.lang.String fileName, java.lang.String absolutePath, java.lang.String content) throws java.lang.Exception
doFormat
in class BaseSourceProcessor
java.lang.Exception
protected java.util.List<java.lang.String> doGetFileNames() throws java.lang.Exception
doGetFileNames
in class BaseSourceProcessor
java.lang.Exception
protected java.lang.String fixDataAccessConnection(java.lang.String className, java.lang.String content)
protected java.lang.String fixIfClause(java.lang.String ifClause, java.lang.String line, int delta)
protected java.lang.String fixIncorrectEmptyLineBeforeCloseCurlyBrace(java.lang.String content, java.lang.String fileName)
protected java.lang.String fixSystemExceptions(java.lang.String content)
protected java.lang.String formatAnnotations(java.lang.String fileName, java.lang.String javaTermName, java.lang.String content, java.lang.String indent) throws java.io.IOException
java.io.IOException
protected java.lang.String formatClassLine(java.lang.String content)
protected java.lang.String formatIfClause(java.lang.String ifClause) throws java.io.IOException
java.io.IOException
protected java.lang.String formatIfClause(java.lang.String ifClause, java.lang.String fileName, int lineCount) throws java.io.IOException
java.io.IOException
protected java.lang.String formatJava(java.lang.String fileName, java.lang.String absolutePath, java.lang.String content) throws java.lang.Exception
java.lang.Exception
protected java.lang.String getCombinedLinesContent(java.lang.String content, java.util.regex.Pattern pattern)
protected java.lang.String getCombinedLinesContent(java.lang.String content, java.lang.String fileName, java.lang.String line, java.lang.String trimmedLine, int lineLength, int lineCount, java.lang.String previousLine, java.lang.String linePart, int tabDiff, boolean addToPreviousLine, boolean extraSpace, int numNextLinesRemoveLeadingTab)
protected java.lang.String getCombinedLinesContent(java.lang.String content, java.lang.String fileName, java.lang.String absolutePath, java.lang.String line, java.lang.String trimmedLine, int lineLength, int lineCount, java.lang.String previousLine, int lineTabCount, int previousLineTabCount)
protected java.lang.String getFormattedClassLine(java.lang.String indent, java.lang.String classLine)
protected int getIfClauseLineBreakPos(java.lang.String line)
protected java.util.List<java.lang.String> getImportedExceptionClassNames(com.thoughtworks.qdox.JavaDocBuilder javaDocBuilder)
protected int getIncorrectLineBreakPos(java.lang.String line, java.lang.String previousLine)
protected int getLineLength(java.lang.String line)
protected int getLineStartPos(java.lang.String content, int lineCount)
protected java.lang.String getModuleServicePackagePath(java.lang.String fileName)
protected java.lang.String getNextLine(java.lang.String content, int lineCount)
protected java.util.Collection<java.lang.String> getPluginJavaFiles() throws java.lang.Exception
java.lang.Exception
protected java.util.Collection<java.lang.String> getPortalJavaFiles() throws java.lang.Exception
java.lang.Exception
protected java.lang.String getTruncateLongLinesContent(java.lang.String content, java.lang.String line, java.lang.String trimmedLine, int lineCount)
protected boolean hasGeneratedTag(java.lang.String content)
protected boolean isAnnotationParameter(java.lang.String content, java.lang.String line)
protected boolean isValidJavaParameter(java.lang.String javaParameter)
protected java.lang.String sortExceptions(java.lang.String line)