public abstract class AbstractBuilderTemplate extends BaseTemplate
Modifier and Type | Field and Description |
---|---|
protected Type |
augmentType
Generated property is set if among methods is found one with the name GET_AUGMENTATION_METHOD_NAME.
|
protected Type |
keyType
GeneratedType for key type, null if this type does not have a key.
|
protected Set<GeneratedProperty> |
properties
Set of class attributes (fields) which are derived from the getter methods names.
|
protected GeneratedType |
targetType |
Constructor and Description |
---|
AbstractBuilderTemplate(org.opendaylight.mdsal.binding.java.api.generator.AbstractJavaGeneratedType javaType,
GeneratedType type,
GeneratedType targetType,
Set<GeneratedProperty> properties,
Type augmentType,
Type keyType) |
AbstractBuilderTemplate(GeneratedType type,
GeneratedType targetType,
Set<GeneratedProperty> properties,
Type augmentType,
Type keyType) |
Modifier and Type | Method and Description |
---|---|
protected String |
generateAugmentField() |
protected abstract CharSequence |
generateCopyAugmentation(Type implType) |
protected CharSequence |
generateCopyConstructor(Type fromType,
Type implType) |
protected abstract CharSequence |
generateCopyKeys(List<GeneratedProperty> keyProps) |
protected CharSequence |
generateFields(boolean makeFinal)
Template method which generates class attributes.
|
CharSequence |
generateGetters(boolean addOverride)
Template method which generate getter methods for IMPL class.
|
CharSequence |
generateToString(Collection<GeneratedProperty> properties) |
asArguments, asArgumentsDeclaration, asCode, asJavadoc, asLink, body, checkArgument, emitConstant, encodeJavadocSymbols, fieldName, formatDataForJavaDoc, formatDataForJavaDoc, formatDataForJavaDoc, formatToParagraph, generate, generateCheckers, generateParameters, getterMethod, getterMethodName, hashCodeResult, propertyNameFromGetter, setterMethod, wrapToDocumentation
protected final Type augmentType
protected final Set<GeneratedProperty> properties
protected final Type keyType
protected final GeneratedType targetType
public AbstractBuilderTemplate(org.opendaylight.mdsal.binding.java.api.generator.AbstractJavaGeneratedType javaType, GeneratedType type, GeneratedType targetType, Set<GeneratedProperty> properties, Type augmentType, Type keyType)
public AbstractBuilderTemplate(GeneratedType type, GeneratedType targetType, Set<GeneratedProperty> properties, Type augmentType, Type keyType)
protected final CharSequence generateFields(boolean makeFinal)
makeFinal
- value which specify whether field is|isn't finalprotected final String generateAugmentField()
public CharSequence generateToString(Collection<GeneratedProperty> properties)
generateToString
in class BaseTemplate
public final CharSequence generateGetters(boolean addOverride)
protected final CharSequence generateCopyConstructor(Type fromType, Type implType)
protected abstract CharSequence generateCopyKeys(List<GeneratedProperty> keyProps)
protected abstract CharSequence generateCopyAugmentation(Type implType)
Copyright © 2019 OpenDaylight. All rights reserved.