Class AbstractBuilderTemplate

java.lang.Object
org.opendaylight.yangtools.binding.codegen.BaseTemplate
org.opendaylight.yangtools.binding.codegen.AbstractBuilderTemplate
Direct Known Subclasses:
BuilderImplTemplate, BuilderTemplate

public abstract class AbstractBuilderTemplate extends BaseTemplate
  • Field Details

    • augmentType

      protected final Type augmentType
      Generated property is set if among methods is found one with the name GET_AUGMENTATION_METHOD_NAME.
    • properties

      protected final Set<org.opendaylight.yangtools.binding.codegen.BuilderGeneratedProperty> properties
      Set of class attributes (fields) which are derived from the getter methods names.
    • keyType

      protected final GeneratedTransferObject keyType
      GeneratedTransferObject for key type, null if this type does not have a key.
    • targetType

      protected final GeneratedType targetType
  • Constructor Details

  • Method Details

    • generateFields

      protected final CharSequence generateFields(boolean makeFinal)
      Template method which generates class attributes.
      Parameters:
      makeFinal - value which specify whether field is|isn't final
      Returns:
      string with class attributes and their types
    • generateGetters

      public final CharSequence generateGetters(boolean addOverride)
      Template method which generate getter methods for IMPL class.
      Returns:
      string with getter methods
    • generateCopyConstructor

      protected final CharSequence generateCopyConstructor(Type fromType, Type implType)
    • generateDeprecatedAnnotation

      protected final CharSequence generateDeprecatedAnnotation(List<AnnotationType> annotations)
    • generateCopyKeys

      protected abstract CharSequence generateCopyKeys(List<GeneratedProperty> keyProps)
    • generateCopyNonKeys

      protected abstract CharSequence generateCopyNonKeys(Collection<org.opendaylight.yangtools.binding.codegen.BuilderGeneratedProperty> props)
    • generateCopyAugmentation

      protected abstract CharSequence generateCopyAugmentation(Type implType)
    • generateDeprecatedAnnotation

      protected abstract CharSequence generateDeprecatedAnnotation(AnnotationType ann)
    • getterByName

      protected static Optional<MethodSignature> getterByName(Iterable<MethodSignature> methods, String implMethodName)
    • propertyNameFromGetter

      protected static String propertyNameFromGetter(MethodSignature getter)
    • propertyNameFromGetter

      protected static String propertyNameFromGetter(String getterName)