@Beta public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type
Modifier and Type | Method and Description |
---|---|
AnnotationTypeBuilder |
addAnnotation(String packageName,
String name)
The method creates new AnnotationTypeBuilder containing specified package
name an annotation name.
|
T |
addComment(TypeComment comment)
Adds String definition of comment into Method Signature definition.
|
Constant |
addConstant(Type type,
String name,
Object value)
Adds Constant definition and returns
new Constant instance. |
T |
addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder)
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. |
GeneratedTOBuilder |
addEnclosingTransferObject(String name)
Adds new Enclosing Transfer Object into definition of Generated Type and
returns
new Instance of Generated TO Builder. |
EnumBuilder |
addEnumeration(String name,
ModuleContext context)
Adds new Enumeration definition for Generated Type Builder and returns
Enum Builder for specifying all Enum parameters.
|
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.
|
GeneratedPropertyBuilder |
addProperty(String name)
Add new Generated Property definition for Generated Transfer Object
Builder and returns Generated Property Builder for specifying Property.
|
boolean |
containsMethod(String methodName)
Checks if GeneratedTypeBuilder contains method with name
methodName |
boolean |
containsProperty(String name)
Check whether GeneratedTOBuilder contains property with name
name |
BindingNamespaceType |
getBindingNamespaceType()
Get the BindingNamespaceType.
|
List<Type> |
getImplementsTypes() |
List<MethodSignatureBuilder> |
getMethodDefinitions() |
Type |
getParentTypeForBuilder()
Gets parent type for data schema node builder, the parent
MUST be a data tree node.
|
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 |
setBindingNamespaceType(@NonNull BindingNamespaceType namespaceType)
Set the BindingNamespaceType.
|
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.
|
Type |
setParentTypeForBuilder(Type type)
Sets parent type for data schema node builder, the parent
MUST be a data tree node.
|
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(List<org.opendaylight.yangtools.yang.common.QName> schemaPath)
Set a list of QNames which represent 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
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.AnnotationTypeBuilder addAnnotation(String packageName, String name)
null
references. In case that any of parameters contains null
the
method SHOULD thrown IllegalArgumentException
packageName
- Package Name of Annotation Typename
- Name of Annotation Typenew
instance of Annotation Type Builder.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, ModuleContext context)
null
, if it is
null
the method SHOULD throw
IllegalArgumentException
name
- Enumeration Namenew
instance of Enumeration Builder.Type getParentTypeForBuilder()
Type setParentTypeForBuilder(Type type)
type
- parent generated type of tree nodeBindingNamespaceType getBindingNamespaceType()
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 existance 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(List<org.opendaylight.yangtools.yang.common.QName> schemaPath)
schemaPath
- a list of QNames which represent 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 nullvoid setBindingNamespaceType(@NonNull BindingNamespaceType namespaceType)
namespaceType
- BindingNamespaceType which type belongs to, must not be nullCopyright © 2019 OpenDaylight. All rights reserved.