Class ModelConstructorWriter
java.lang.Object
de.hybris.bootstrap.codegenerator.AbstractImportProvider
de.hybris.bootstrap.codegenerator.MethodWriter
de.hybris.bootstrap.codegenerator.model.ModelConstructorWriter
- All Implemented Interfaces:
CodeWriter
The model constructor class. Contains the constructor parameters (sorted, non-sorted), api documentation and
annotations.
-
Field Summary
Fields inherited from class de.hybris.bootstrap.codegenerator.MethodWriter
ABSTRACT, FINAL, STATIC, SYNCHRONIZED -
Constructor Summary
ConstructorsConstructorDescriptionModelConstructorWriter(Visibility visibility, String className, boolean sortedArguments) Creates a model constructor with the givenVisibility, the class name, the type and if the constructor parameters should be sorted alphabetically or not.ModelConstructorWriter(String className) Creates a public model constructor with sorted parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(String type, YAttributeDescriptor desc, boolean mandatory) protected Stringintvoidprotected voidwriteContent(JavaFile file) Methods inherited from class de.hybris.bootstrap.codegenerator.MethodWriter
addAnnotation, addComment, addDeprecatedAnnotation, addParameter, addThrownException, analyzeAndStripReturnType, assembleThrowsClause, extractClassNames, getAnnotations, getContent, getJavadoc, getModifiers, getName, getParameterType, getRequiredImports, getReturnType, getSignature, getThrownExceptions, getVisibility, isAbstract, isConstructor, modifiersToString, setAbstract, setConstructor, setContent, setContentPlain, setJavadoc, setModifiers, setReturnType, setVisibility, stripPackageName, writeTextToFileMethods inherited from class de.hybris.bootstrap.codegenerator.AbstractImportProvider
addRequiredImport
-
Constructor Details
-
ModelConstructorWriter
Creates a public model constructor with sorted parameters.- Parameters:
className- the class name
-
ModelConstructorWriter
Creates a model constructor with the givenVisibility, the class name, the type and if the constructor parameters should be sorted alphabetically or not.- Parameters:
visibility- should be public or protectedclassName- the class namesortedArguments- if false the parameters are in the order which they where added.
-
-
Method Details
-
assembleSignature
- Overrides:
assembleSignaturein classMethodWriter
-
write
- Specified by:
writein interfaceCodeWriter- Overrides:
writein classMethodWriter
-
writeContent
- Overrides:
writeContentin classMethodWriter
-
addParameter
-
getParamaterCount
public int getParamaterCount()
-