Package 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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) String[]
boolean
void
setPropNames
(String[] propNames) void
setsSkipsSilently
(boolean skips_silently)
-
Constructor Details
-
ExplicitPropsConstructorGeneratorExtension
public ExplicitPropsConstructorGeneratorExtension() -
ExplicitPropsConstructorGeneratorExtension
-
-
Method Details
-
getPropNames
-
setPropNames
-
isSkipsSilently
public boolean isSkipsSilently() -
setsSkipsSilently
public void setsSkipsSilently(boolean skips_silently) -
extraGeneralImports
- Specified by:
extraGeneralImports
in interfaceGeneratorExtension
-
extraSpecificImports
- Specified by:
extraSpecificImports
in interfaceGeneratorExtension
-
extraInterfaceNames
- Specified by:
extraInterfaceNames
in interfaceGeneratorExtension
-
generate
public void generate(ClassInfo info, Class superclassType, Property[] props, Class[] propTypes, IndentedWriter iw) throws IOException - Specified by:
generate
in interfaceGeneratorExtension
- Throws:
IOException
-