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 java.lang.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
Constructors Constructor Description ExplicitPropsConstructorGeneratorExtension()
ExplicitPropsConstructorGeneratorExtension(java.lang.String[] propNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection
extraGeneralImports()
java.util.Collection
extraInterfaceNames()
java.util.Collection
extraSpecificImports()
void
generate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw)
java.lang.String[]
getPropNames()
boolean
isSkipsSilently()
void
setPropNames(java.lang.String[] propNames)
void
setsSkipsSilently(boolean skips_silently)
-
-
-
Method Detail
-
getPropNames
public java.lang.String[] getPropNames()
-
setPropNames
public void setPropNames(java.lang.String[] propNames)
-
isSkipsSilently
public boolean isSkipsSilently()
-
setsSkipsSilently
public void setsSkipsSilently(boolean skips_silently)
-
extraGeneralImports
public java.util.Collection extraGeneralImports()
- Specified by:
extraGeneralImports
in interfaceGeneratorExtension
-
extraSpecificImports
public java.util.Collection extraSpecificImports()
- Specified by:
extraSpecificImports
in interfaceGeneratorExtension
-
extraInterfaceNames
public java.util.Collection extraInterfaceNames()
- Specified by:
extraInterfaceNames
in interfaceGeneratorExtension
-
generate
public void generate(ClassInfo info, java.lang.Class superclassType, Property[] props, java.lang.Class[] propTypes, IndentedWriter iw) throws java.io.IOException
- Specified by:
generate
in interfaceGeneratorExtension
- Throws:
java.io.IOException
-
-