Interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>

All Superinterfaces:
AnnotableTypeBuilder, org.opendaylight.yangtools.concepts.Identifiable<JavaTypeName>, Type
All Known Subinterfaces:
GeneratedTOBuilder, GeneratedTypeBuilder

public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type, AnnotableTypeBuilder
  • Method Details

    • addEnclosingTransferObject

      T addEnclosingTransferObject(GeneratedTransferObject genTO)
      Adds new Enclosing Transfer Object genTOBuilder into definition of Generated Type.
      There is no need of specifying of Package Name because enclosing Type is already defined inside Generated Type with specific package name.
      The name of enclosing Type cannot be same as Name of parent type and if there is already defined enclosing type with the same name, the new enclosing type will simply overwrite the older definition.
      If the parameter genTOBuilder of enclosing type is null the method SHOULD throw IllegalArgumentException.
      Parameters:
      genTO - Name of Enclosing Type
    • addComment

      T addComment(TypeComment comment)
      Adds String definition of comment into Method Signature definition.
      The comment String MUST NOT contain any comment specific chars (i.e. "/**" or "//") just plain String text description.
      Parameters:
      comment - Comment String.
    • isAbstract

      boolean isAbstract()
    • setAbstract

      T setAbstract(boolean isAbstract)
      Sets the abstract flag to define Generated Type as abstract type.
      Parameters:
      isAbstract - abstract flag
    • getImplementsTypes

      List<Type> getImplementsTypes()
    • addImplementsType

      T addImplementsType(Type genType)
      Add Type to implements.
      Parameters:
      genType - Type to implement
      Returns:
      true if the addition of type is successful.
    • addConstant

      Constant addConstant(Type type, String name, Object value)
      Adds Constant definition and returns new Constant instance.
      By definition Constant MUST be defined by return Type, Name and assigned value. The name SHOULD be defined with capital letters. Neither of method parameters can be null and the method SHOULD throw IllegalArgumentException if the contract is broken.
      Parameters:
      type - Constant Type
      name - Name of Constant
      value - Assigned Value
      Returns:
      new Constant instance.
    • addEnumeration

      void addEnumeration(Enumeration enumeration)
      Adds new Enumeration definition for Generated Type Builder and returns Enum Builder for specifying all Enum parameters.
      If there is already Enumeration stored with the same name, the old enum will be simply overwritten byt new enum definition.
      Name of Enumeration cannot be null, if it is null the method SHOULD throw IllegalArgumentException.
      Parameters:
      enumeration - Enumeration to add
    • getMethodDefinitions

      List<MethodSignatureBuilder> getMethodDefinitions()
    • addMethod

      MethodSignatureBuilder addMethod(String name)
      Add new Method Signature definition for Generated Type Builder and returns Method Signature Builder for specifying all Method parameters.
      Name of Method cannot be null, if it is null the method SHOULD throw IllegalArgumentException.
      By Default the MethodSignatureBuilder SHOULD be pre-set as MethodSignatureBuilder.setAbstract(boolean), {TypeMemberBuilder#setFinal(boolean)} and {TypeMemberBuilder#setAccessModifier(boolean)}
      Parameters:
      name - Name of Method
      Returns:
      new instance of Method Signature Builder.
    • containsMethod

      boolean containsMethod(String methodName)
      Checks if GeneratedTypeBuilder contains method with name methodName.
      Parameters:
      methodName - is method name
    • getProperties

      List<GeneratedPropertyBuilder> getProperties()
    • getYangSourceDefinition

      Optional<YangSourceDefinition> getYangSourceDefinition()
      Returns the YANG definition of this type, if available.
      Returns:
      YANG source definition, or empty when unavailable.
    • addProperty

      GeneratedPropertyBuilder addProperty(String name)
      Add new Generated Property definition for Generated Transfer Object Builder and returns Generated Property Builder for specifying Property.
      Name of Property cannot be null, if it is null the method SHOULD throw IllegalArgumentException.
      Parameters:
      name - Name of Property
      Returns:
      new instance of Generated Property Builder.
    • containsProperty

      boolean containsProperty(String name)
      Check whether GeneratedTOBuilder contains property with name name.
      Parameters:
      name - of property which existence is checked
      Returns:
      true if property name exists in list of properties.
    • setDescription

      void setDescription(String description)
      Set a string that contains a human-readable textual description of type definition.
      Parameters:
      description - a string that contains a human-readable textual description of type definition.
    • setModuleName

      void setModuleName(String moduleName)
      Set the name of the module, in which generated type was specified.
      Parameters:
      moduleName - the name of the module
    • setReference

      void setReference(String reference)
      Set a string that is used to specify a textual cross-reference to an external document, either another module that defines related management information, or a document that provides additional information relevant to this definition.
      Parameters:
      reference - a textual cross-reference to an external document.
    • setYangSourceDefinition

      void setYangSourceDefinition(@NonNull YangSourceDefinition definition)
      Set the YANG source definition.
      Parameters:
      definition - YANG source definition, must not be null