public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type, AnnotableTypeBuilder
Modifier and Type | Method and Description |
---|---|
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. |
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. |
T |
addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder)
Adds new Enclosing Transfer Object
genTOBuilder into definition of Generated Type. |
GeneratedTOBuilder |
addEnclosingTransferObject(String name)
Adds new Enclosing Transfer Object into definition of Generated Type and returns
new Instance
of Generated TO Builder.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 name of enclosing type is null the method SHOULD throw IllegalArgumentException . |
EnumBuilder |
addEnumeration(String name)
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 . |
T |
addImplementsType(Type genType)
Add Type to implements.
|
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)} |
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 . |
boolean |
containsMethod(String methodName)
Checks if GeneratedTypeBuilder contains method with name
methodName . |
boolean |
containsProperty(String name)
Check whether GeneratedTOBuilder contains property with name
name . |
List<Type> |
getImplementsTypes() |
List<MethodSignatureBuilder> |
getMethodDefinitions() |
List<GeneratedPropertyBuilder> |
getProperties() |
Optional<YangSourceDefinition> |
getYangSourceDefinition()
Returns the YANG definition of this type, if available.
|
boolean |
isAbstract() |
T |
setAbstract(boolean isAbstract)
Sets the
abstract flag to define Generated Type as abstract type. |
void |
setDescription(String description)
Set a string that contains a human-readable textual description of type definition.
|
void |
setModuleName(String moduleName)
Set the name of the module, in which generated type was specified.
|
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.
|
void |
setSchemaPath(org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
Schema path in schema tree from actual concrete type to the root.
|
void |
setYangSourceDefinition(@NonNull YangSourceDefinition definition)
Set the YANG source definition.
|
getFullyQualifiedName, getName, getPackageName
addAnnotation, addAnnotation
GeneratedTOBuilder addEnclosingTransferObject(String name)
new
Instance
of Generated TO Builder.null
the method SHOULD throw IllegalArgumentException
.name
- Name of Enclosing Typenew
Instance of Generated Type Builder.T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder)
genTOBuilder
into definition of Generated Type.
genTOBuilder
of enclosing type is null
the method SHOULD throw
IllegalArgumentException
.genTOBuilder
- Name of Enclosing TypeT addComment(TypeComment comment)
comment
- Comment String.boolean isAbstract()
T setAbstract(boolean isAbstract)
abstract
flag to define Generated Type as abstract type.isAbstract
- abstract flagT addImplementsType(Type genType)
genType
- Type to implementtrue
if the addition of type is successful.Constant addConstant(Type type, String name, Object value)
new
Constant instance.null
and the method SHOULD throw
IllegalArgumentException
if the contract is broken.type
- Constant Typename
- Name of Constantvalue
- Assigned Valuenew
Constant instance.EnumBuilder addEnumeration(String name)
null
, if it is null
the method SHOULD throw
IllegalArgumentException
.name
- Enumeration Namenew
instance of Enumeration Builder.List<MethodSignatureBuilder> getMethodDefinitions()
MethodSignatureBuilder addMethod(String name)
null
, if it is null
the method SHOULD throw
IllegalArgumentException
.MethodSignatureBuilder.setAbstract(boolean)
, {TypeMemberBuilder#setFinal(boolean)} and
{TypeMemberBuilder#setAccessModifier(boolean)}name
- Name of Methodnew
instance of Method Signature Builder.boolean containsMethod(String methodName)
methodName
.methodName
- is method nameList<GeneratedPropertyBuilder> getProperties()
Optional<YangSourceDefinition> getYangSourceDefinition()
GeneratedPropertyBuilder addProperty(String name)
null
, if it is null
the method SHOULD throw
IllegalArgumentException
.name
- Name of Propertynew
instance of Generated Property Builder.boolean containsProperty(String name)
name
.name
- of property which existence is checkedname
exists in list of properties.void setDescription(String description)
description
- a string that contains a human-readable textual description of type definition.void setModuleName(String moduleName)
moduleName
- the name of the modulevoid setSchemaPath(org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
schemaPath
- schema path in schema treevoid setReference(String reference)
reference
- a textual cross-reference to an external document.void setYangSourceDefinition(@NonNull YangSourceDefinition definition)
definition
- YANG source definition, must not be nullCopyright © 2019 OpenDaylight. All rights reserved.