Package org.jboss.test.audit.generate
Class SectionsClassGenerator
- java.lang.Object
-
- org.jboss.test.audit.generate.SectionsClassGenerator
-
public class SectionsClassGenerator extends Object
Generates the source code (naive way) of a section constants container class. The original intention was to generate the source code during annotation processing. However due to various problems this class should be called separately (probably using exec-maven-plugin).- Author:
- Martin Kouba
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSectionsClassGenerator.GeneratedSource
-
Field Summary
Fields Modifier and Type Field Description protected static StringsourceClassName
-
Constructor Summary
Constructors Constructor Description SectionsClassGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SectionsClassGenerator.GeneratedSourcegenerateSource(InputStream auditXmlFile, String packageBase)voidgenerateToFile(File outputDir, InputStream auditFile, String packageBase)static voidmain(String[] args)protected StringpackageNameToPath(String packageName)SectionsClassGeneratorsetFileSeparator(String fileSeparator)
-
-
-
Field Detail
-
sourceClassName
protected static String sourceClassName
-
-
Method Detail
-
main
public static void main(String[] args)
- Parameters:
args-
-
generateSource
public SectionsClassGenerator.GeneratedSource generateSource(InputStream auditXmlFile, String packageBase) throws SAXException, IOException, ParserConfigurationException
- Parameters:
auditXmlFile-packageBase-- Returns:
- Throws:
SAXExceptionIOExceptionParserConfigurationException
-
generateToFile
public void generateToFile(File outputDir, InputStream auditFile, String packageBase) throws URISyntaxException, SAXException, IOException, ParserConfigurationException
- Parameters:
auditFile-packageBase-- Throws:
URISyntaxExceptionSAXExceptionIOExceptionParserConfigurationException
-
setFileSeparator
public SectionsClassGenerator setFileSeparator(String fileSeparator)
-
-