Package com.liferay.portal.tools
Class BaseImportsFormatter
Object
com.liferay.portal.tools.BaseImportsFormatter
- All Implemented Interfaces:
ImportsFormatter
- Direct Known Subclasses:
JavaImportsFormatter
- Author:
- André de Oliveira, Hugo Huijser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ImportPackagecreateImportPackage(String line) protected ImportPackageprotected abstract Stringprotected StringsortAndGroupImports(String imports) protected StringstripUnusedImports(String imports, String content, String packagePath, String className, String classNameExceptionRegex)
-
Constructor Details
-
BaseImportsFormatter
public BaseImportsFormatter()
-
-
Method Details
-
format
- Specified by:
formatin interfaceImportsFormatter- Throws:
IOException
-
format
- Specified by:
formatin interfaceImportsFormatter- Throws:
IOException
-
createImportPackage
-
createJavaImportPackage
-
doFormat
protected abstract String doFormat(String content, Pattern importPattern, String packagePath, String className) throws IOException - Throws:
IOException
-
sortAndGroupImports
- Throws:
IOException
-
stripUnusedImports
protected String stripUnusedImports(String imports, String content, String packagePath, String className, String classNameExceptionRegex) throws IOException - Throws:
IOException
-