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 ImportPackage
createImportPackage
(String line) protected ImportPackage
protected abstract String
protected String
sortAndGroupImports
(String imports) protected String
stripUnusedImports
(String imports, String content, String packagePath, String className, String classNameExceptionRegex)
-
Constructor Details
-
BaseImportsFormatter
public BaseImportsFormatter()
-
-
Method Details
-
format
- Specified by:
format
in interfaceImportsFormatter
- Throws:
IOException
-
format
- Specified by:
format
in 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
-