com.mchange.v2.codegen.bean
Class ExplicitPropsConstructorGeneratorExtension
java.lang.Object
com.mchange.v2.codegen.bean.ExplicitPropsConstructorGeneratorExtension
- All Implemented Interfaces:
- GeneratorExtension
public class ExplicitPropsConstructorGeneratorExtension
- extends Object
- implements GeneratorExtension
Writes a constructor that takes an explicitly listed subset of a bean's properties
for its arguments, and sets these properties initial values appropriately.
Skips any specified names for properties that are not found in a bean being generated.
Writes nothing if there are none of the property names are properties of the bean.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExplicitPropsConstructorGeneratorExtension
public ExplicitPropsConstructorGeneratorExtension()
ExplicitPropsConstructorGeneratorExtension
public ExplicitPropsConstructorGeneratorExtension(String[] propNames)
getPropNames
public String[] getPropNames()
setPropNames
public void setPropNames(String[] propNames)
isSkipsSilently
public boolean isSkipsSilently()
setsSkipsSilently
public void setsSkipsSilently(boolean skips_silently)
extraGeneralImports
public Collection extraGeneralImports()
- Specified by:
extraGeneralImports
in interface GeneratorExtension
extraSpecificImports
public Collection extraSpecificImports()
- Specified by:
extraSpecificImports
in interface GeneratorExtension
extraInterfaceNames
public Collection extraInterfaceNames()
- Specified by:
extraInterfaceNames
in interface GeneratorExtension
generate
public void generate(ClassInfo info,
Class superclassType,
Property[] props,
Class[] propTypes,
IndentedWriter iw)
throws IOException
- Specified by:
generate
in interface GeneratorExtension
- Throws:
IOException