public class ConfigGenerator extends Object
$JAVA_HOME/bin/java -classpath <classpath> org.smooks.cartridges.javabean.gen.ConfigGenerator -c <rootBeanClass> -o <outputFilePath> [-p <propertiesFilePath>]
Modifier and Type | Field and Description |
---|---|
protected Stack<Class<?>> |
classStack |
protected Writer |
outputWriter |
static String |
PACKAGES_EXCLUDED |
static String |
PACKAGES_INCLUDED |
protected List<String> |
packagesExcluded |
protected List<String> |
packagesIncluded |
static String |
ROOT_BEAN_CLASS |
protected Class<?> |
rootBeanClass |
protected Set<org.smooks.api.converter.TypeConverterFactory<?,?>> |
typeConverterFactories |
Constructor and Description |
---|
ConfigGenerator(Properties bindingProperties,
Writer outputWriter,
ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
protected void |
addArrayConfig(List<ClassConfig> classConfigs,
List<BindingConfig> bindings,
String rootPackage,
Field field) |
protected ClassConfig |
addClassConfig(List<ClassConfig> classConfigs,
Class<?> beanClass,
String beanId) |
protected void |
addCollectionConfig(List<ClassConfig> classConfigs,
List<BindingConfig> bindings,
String rootPackage,
Field field) |
protected void |
configure(Properties bindingProperties) |
void |
generate() |
protected static String |
getArgument(String argAlias,
String argName,
boolean mandatory,
String[] args) |
protected boolean |
isExcluded(String packageName) |
protected boolean |
isIncluded(String packageName) |
protected boolean |
isInPackageList(List<String> packages,
String typePackage) |
protected static Properties |
loadProperties(String fileName) |
static void |
main(String[] args) |
protected List<String> |
parsePackages(String packagesString) |
public static final String ROOT_BEAN_CLASS
public static final String PACKAGES_INCLUDED
public static final String PACKAGES_EXCLUDED
protected final Set<org.smooks.api.converter.TypeConverterFactory<?,?>> typeConverterFactories
protected final Writer outputWriter
protected Class<?> rootBeanClass
public ConfigGenerator(Properties bindingProperties, Writer outputWriter, ClassLoader classLoader) throws ClassNotFoundException
ClassNotFoundException
public static void main(String[] args) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void generate() throws IOException
IOException
protected ClassConfig addClassConfig(List<ClassConfig> classConfigs, Class<?> beanClass, String beanId)
protected void addArrayConfig(List<ClassConfig> classConfigs, List<BindingConfig> bindings, String rootPackage, Field field)
protected void addCollectionConfig(List<ClassConfig> classConfigs, List<BindingConfig> bindings, String rootPackage, Field field)
protected boolean isIncluded(String packageName)
protected boolean isExcluded(String packageName)
protected void configure(Properties bindingProperties) throws ClassNotFoundException
ClassNotFoundException
protected static Properties loadProperties(String fileName) throws IOException
IOException
Copyright © 2024. All rights reserved.