This fixes a few violations and flips enforcement on.
Change-Id: Id55c011e8a7f5e85e678aefe793e6aba585ee083
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
<artifactId>yang-binding</artifactId>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
public interface BindingGeneratorServiceProvider {
- void registerTypeProvider(final TypeProvider provider);
+ void registerTypeProvider(TypeProvider provider);
}
import java.util.List;
/**
- * The Annotation Type interface is designed to hold information about
- * annotation for any type that could be annotated in Java. <br>
- * For sake of simplicity the Annotation Type is not designed to model exact
- * behaviour of annotation mechanism, but just to hold information needed to
- * model annotation over java Type definition.
+ * The Annotation Type interface is designed to hold information about annotation for any type that could be annotated
+ * in Java.<br>
+ * For sake of simplicity the Annotation Type is not designed to model exact behaviour of annotation mechanism,
+ * but just to hold information needed to model annotation over java Type definition.
*/
public interface AnnotationType extends Type {
-
/**
- * Returns the List of Annotations. <br>
- * Each Annotation Type MAY have defined multiple Annotations.
+ * Returns the List of Annotations. Each Annotation Type MAY have defined multiple Annotations.
*
* @return the List of Annotations.
*/
List<AnnotationType> getAnnotations();
/**
- * Returns Parameter Definition assigned for given parameter name. <br>
- * If Annotation does not contain parameter with specified param name, the
- * method MAY return <code>null</code> value.
+ * Returns Parameter Definition assigned for given parameter name. If Annotation does not contain parameter
+ * with specified param name, the method MAY return <code>null</code> value.
*
- * @param paramName
- * Parameter Name
+ * @param paramName Parameter Name
* @return Parameter Definition assigned for given parameter name.
*/
- Parameter getParameter(final String paramName);
+ Parameter getParameter(String paramName);
/**
* Returns List of all parameters assigned to Annotation Type.
boolean containsParameters();
/**
- * Annotation Type parameter interface. For simplicity the Parameter
- * contains values and value types as Strings. Every annotation which
- * contains parameters could contain either single parameter or array of
- * parameters. To model this purposes the by contract if the parameter
- * contains single parameter the {@link #getValues()} method will return
- * empty List and {@link #getValue()} MUST always return non-
- * <code>null</code> parameter. If the Parameter holds List of values the
- * singular {@link #getValue()} parameter MAY return <code>null</code>
- * value.
+ * Annotation Type parameter interface. For simplicity the Parameter contains values and value types as Strings.
+ * Every annotation which contains parameters could contain either single parameter or array of parameters. To model
+ * this purposes the by contract if the parameter contains single parameter the {@link #getValues()} method will
+ * return empty List and {@link #getValue()} MUST always return non-<code>null</code> parameter. If the Parameter
+ * holds List of values the singular {@link #getValue()} parameter MAY return <code>null</code> value.
*/
interface Parameter {
-
/**
* Returns the Name of the parameter.
*
String getName();
/**
- * Returns value in String format if Parameter contains singular value,
- * otherwise MAY return <code>null</code>.
+ * Returns value in String format if Parameter contains singular value, otherwise MAY return <code>null</code>.
*
* @return value in String format if Parameter contains singular value.
*/
String getValue();
/**
- * Returns List of Parameter assigned values in order in which they were
- * assigned for given parameter name. <br>
- * If there are multiple values assigned for given parameter name the
- * method MUST NOT return empty List.
+ * Returns List of Parameter assigned values in order in which they were assigned for given parameter name.<br>
+ * If there are multiple values assigned for given parameter name the method MUST NOT return empty List.
*
- * @return List of Parameter assigned values in order in which they were
- * assigned for given parameter name.
+ * @return List of Parameter assigned values in order in which they were assigned for given parameter name.
*/
List<String> getValues();
}
package org.opendaylight.mdsal.binding.model.api;
/**
- * Transformates virtual data to the concrete code in programming language.
+ * Transforms virtual data to the concrete code in programming language.
*/
public interface CodeGenerator {
-
/**
* Generates code for <code>type</code>.
*
- * @param type
- * Input type to be processed
+ * @param type Input type to be processed
* @return generated JAVA code
*/
String generate(Type type);
/**
- * Checks if the concrete instance of <code>type</code> fit to concrete
- * implementation of this interface.
- *
- * (e. g. method return true if in <code>EnumGenerator</code> (which
- * implements this interface) has input parameter of type Enumeration (which
- * is subtype of Type)
+ * Checks if the concrete instance of <code>type</code> fit to concrete implementation of this interface (e.g.
+ * method return true if in <code>EnumGenerator</code> (which implements this interface) has input parameter of type
+ * Enumeration (which is subtype of Type).
*
- * @param type
- * Input type to be processed
+ * @param type Input type to be processed
* @return true if type is acceptable for processing.
*/
boolean isAcceptable(Type type);
/**
* Returns name of <code>type</code> parameter.
*
- * @param type
- * Input type to be processed
+ * @param type Input type to be processed
* @return name of generated unit
*/
String getUnitName(Type type);
-
}
* Interface provide methods for reading data of enumeration class.
*/
public interface Enumeration extends GeneratedType {
-
/**
- *
* Returns list of annotation definitions associated with enumeration type.
*
* @return list of annotation definitions associated with enumeration type.
- *
*/
@Override
List<AnnotationType> getAnnotations();
String toFormattedString();
/**
- * Interface is used for reading enumeration item. It means item's name and
- * its value.
+ * Interface is used for reading enumeration item. It means item's name and its value.
*/
interface Pair extends DocumentedNode.WithStatus {
-
/**
- * Returns the name of the enumeration item as it is specified in the input yang.
+ * Returns the name of the enumeration item as it is specified in the input YANG.
*
- * @return the name of the enumeration item as it is specified in the input yang.
+ * @return the name of the enumeration item as it is specified in the input YANG.
*/
String getName();
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
/**
- * Generated Transfer Object extends {@link GeneratedType} and is designed to
- * represent Java Class. The Generated Transfer Object contains declarations of
- * member fields stored in List of Properties. The Generated Transfer Object can
- * be extended by exactly ONE Generated Transfer Object as Java don't allow
- * multiple inheritance. For retrieval of implementing Generated Types use
- * {@link #getImplements()} method. <br>
- * Every transfer object SHOULD contain equals, hashCode and toString
- * definitions. For this purpose retrieve definitions through
- * {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
- * {@link #getToStringIdentifiers ()}.
+ * Generated Transfer Object extends {@link GeneratedType} and is designed to represent Java Class. The Generated
+ * Transfer Object contains declarations of member fields stored in List of Properties. The Generated Transfer Object
+ * can be extended by exactly ONE Generated Transfer Object as Java does not allow multiple inheritance. For retrieval
+ * of implementing Generated Types use {@link #getImplements()} method.<br>
+ * Every transfer object SHOULD contain equals, hashCode and toString definitions. For this purpose retrieve definitions
+ * through {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
+ * {@link #getToStringIdentifiers()}.
*/
public interface GeneratedTransferObject extends GeneratedType {
GeneratedProperty getSUID();
/**
- * Returns the Generated Transfer Object from which this GTO is derived, or
- * null if this GTO is not derived from a GTO -- e.g. it is either an union
- * or it is derived from a concrete type.
+ * Returns the Generated Transfer Object from which this GTO is derived, or null if this GTO is not derived
+ * from a GTO -- e.g. it is either an union or it is derived from a concrete type.
*
- * @return Generated Transfer Object or <code>null</code> if this GTO is
- * not derived from another GTO.
+ * @return Generated Transfer Object or <code>null</code> if this GTO is not derived from another GTO.
*/
GeneratedTransferObject getSuperType();
/**
- * Returns List of Properties that are designated to define equality for
- * Generated Transfer Object.
+ * Returns List of Properties that are designated to define equality for Generated Transfer Object.
*
- * @return List of Properties that are designated to define equality for
- * Generated Transfer Object.
+ * @return List of Properties that are designated to define equality for Generated Transfer Object.
*/
List<GeneratedProperty> getEqualsIdentifiers();
/**
- * Returns List of Properties that are designated to define identity for
- * Generated Transfer Object.
+ * Returns List of Properties that are designated to define identity for Generated Transfer Object.
*
- * @return List of Properties that are designated to define identity for
- * Generated Transfer Object.
+ * @return List of Properties that are designated to define identity for Generated Transfer Object.
*/
List<GeneratedProperty> getHashCodeIdentifiers();
/**
- * Returns List of Properties that will be members of toString definition
- * for Generated Transfer Object.
+ * Returns List of Properties that will be members of toString definition for Generated Transfer Object.
*
- * @return List of Properties that will be members of toString definition
- * for Generated Transfer Object.
+ * @return List of Properties that will be members of toString definition for Generated Transfer Object.
*/
List<GeneratedProperty> getToStringIdentifiers();
boolean isTypedef();
/**
- * Returns Base type of Java representation of YANG typedef if set, otherwise it returns null
+ * Returns Base type of Java representation of YANG typedef if set, otherwise it returns null.
*
* @return Base type of Java representation of YANG typedef if set, otherwise it returns null
*/
TypeDefinition<?> getBaseType();
/**
- * Return boolean value which describe whether Generated Transfer Object
- * was/wasn't created from union YANG type.
+ * Return boolean value which describe whether Generated Transfer Object was created (or not) from union YANG type.
*
- * @return true value if Generated Transfer Object was created from union
- * YANG type.
+ * @return true value if Generated Transfer Object was created from union YANG type.
*/
boolean isUnionType();
* Every Java interface has to be specified with:
* <ul>
* <li><code>package</code> that belongs into</li>
- * <li><code>interface</code> name (with commentary that <b>SHOULD</b> be
- * present to proper define interface and base <i>contracts</i> specified for
- * interface)</li>
- * <li>Each Generated Type can define list of types that Generated Type can
- * implement to extend it's definition (i.e. interface extends list of
- * interfaces or java class implements list of interfaces)</li>
- * <li>Each Generated Type can contain multiple enclosed definitions of
- * Generated Types (i.e. interface can contain N enclosed interface definitions
- * or enclosed classes)</li>
- * <li><code>enum</code> and <code>constant</code> definitions (i.e. each
- * constant definition is by default defined as <code>public static final</code>
- * + type (either primitive or object) and constant name</li>
- * <li><code>method definitions</code> with specified input parameters (with
- * types) and return values</li>
+ * <li><code>interface</code> name (with commentary that <b>SHOULD</b> be present to proper define interface and base
+ * <i>contracts</i> specified for interface)</li>
+ * <li>Each Generated Type can define list of types that Generated Type can implement to extend it's definition
+ * (i.e. interface extends list of interfaces or java class implements list of interfaces)</li>
+ * <li>Each Generated Type can contain multiple enclosed definitions of Generated Types (i.e. interface can contain N
+ * enclosed interface definitions or enclosed classes)</li>
+ * <li><code>enum</code> and <code>constant</code> definitions (i.e. each constant definition is by default defined
+ * as <code>public static final</code> + type (either primitive or object) and constant name</li>
+ * <li><code>method definitions</code> with specified input parameters (with types) and return values</li>
* </ul>
*
- * By the definition of the interface constant, enum, enclosed types and method
- * definitions MUST be public, so there is no need to specify the scope of
- * visibility.
+ * <p>
+ * By the definition of the interface constant, enum, enclosed types and method definitions MUST be public, so there is
+ * no need to specify the scope of visibility.
*/
public interface GeneratedType extends Type, DocumentedType {
-
/**
- * Returns the parent type if Generated Type is defined as enclosing type,
- * otherwise returns <code>null</code>
+ * Returns the parent type if Generated Type is defined as enclosing type, otherwise returns <code>null</code>.
*
- * @return the parent type if Generated Type is defined as enclosing type,
- * otherwise returns <code>null</code>
+ * @return the parent type if Generated Type is defined as enclosing type, otherwise returns <code>null</code>
*/
Type getParentType();
List<GeneratedType> getEnclosedTypes();
/**
- * Returns List of all Enumerator definitions associated with Generated
- * Type.
+ * Returns List of all Enumerator definitions associated with Generated Type.
*
- * @return List of all Enumerator definitions associated with Generated
- * Type.
+ * @return List of all Enumerator definitions associated with Generated Type.
*/
List<Enumeration> getEnumerations();
List<Constant> getConstantDefinitions();
/**
- * Returns List of Method Definitions associated with Generated Type.
- *
- * List does not contains getters and setters for properties.
+ * Returns List of Method Definitions associated with Generated Type. The list does not contains getters and setters
+ * for properties.
*
* @return List of Method Definitions associated with Generated Type.
*/
List<MethodSignature> getMethodDefinitions();
/**
- * Returns List of Properties that are declared for Generated Transfer
- * Object.
+ * Returns List of Properties that are declared for Generated Transfer Object.
*
- * @return List of Properties that are declared for Generated Transfer
- * Object.
+ * @return List of Properties that are declared for Generated Transfer Object.
*/
List<GeneratedProperty> getProperties();
* @throws IllegalArgumentException if the simpleName is empty
* @throws UnsupportedOperationException if this type name does not support nested type
*/
- public abstract boolean canCreateEnclosed(final String simpleName);
+ public abstract boolean canCreateEnclosed(String simpleName);
/**
* Create a TypeName for a class immediately enclosed by this class.
package org.opendaylight.mdsal.binding.model.api;
/**
- * Represents an instance of simple parametrized type such as List<String>.
- *
- * The parametrized Type is designed to be used to store information of Java
- * Generic Type. The array of {@link #getActualTypeArguments()} holds
+ * Represents an instance of simple parameterized type such as List<String>. The parameterized Type is designed
+ * to be used to store information of Java Generic Type. The array of {@link #getActualTypeArguments()} holds
* information of all generic parameters defined for Parameterized Type.
*/
public interface ParameterizedType extends Type {
-
/**
* Returns array of Types that are defined for Parameterized Type.
* <br>
- * (for example if ParameterizedType encapsulates java generic Map that
- * specifies two parameters Map<K,V> and the K is java.lang.Integer and V
- * is defined as GeneratedType the array will contain two Types to store
+ * (for example if ParameterizedType encapsulates java generic Map that specifies two parameters Map<K,V>
+ * and the K is java.lang.Integer and V is defined as GeneratedType the array will contain two Types to store
* the information of generic parameters.)
*
* @return array of Types that are defined for Parameterized Type.
public interface Restrictions {
Optional<LengthConstraint> getLengthConstraint();
+
List<PatternConstraint> getPatternConstraints();
+
Optional<? extends RangeConstraint<?>> getRangeConstraint();
- boolean isEmpty();
+ boolean isEmpty();
}
package org.opendaylight.mdsal.binding.model.api;
/**
- *
- * Marker interface which assign to object property that it is bounded wildcard
- * type.
+ * Marker interface which assign to object property that it is a bounded wildcard type.
*/
public interface WildcardType extends Type {
* @param identifier JavaTypeName of the annotation
* @return a new instance of Annotation Type Builder.
*/
- AnnotationTypeBuilder addAnnotation(final JavaTypeName identifier);
+ AnnotationTypeBuilder addAnnotation(JavaTypeName identifier);
/**
* The method creates new {@link AnnotationTypeBuilder} containing specified package name an annotation name.
* @see AnnotationType
*/
public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
-
/**
* The method creates new AnnotationTypeBuilder containing specified package
* name an annotation name. <br>
* references. In case that any of parameters contains <code>null</code> the
* method SHOULD thrown {@link IllegalArgumentException}
*
- * @param packageName
- * Package Name of Annotation Type
- * @param name
- * Name of Annotation Type
+ * @param packageName Package Name of Annotation Type
+ * @param name Name of Annotation Type
* @return <code>new</code> instance of Annotation Type Builder.
*/
- AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+ AnnotationTypeBuilder addAnnotation(String packageName, String name);
/**
* Adds the parameter into List of parameters for Annotation Type. <br>
* In case that any of parameters contains <code>null</code> the method
* SHOULD thrown {@link IllegalArgumentException}
*
- * @param paramName
- * Parameter Name
- * @param value
- * Parameter Value
- * @return <code>true</code> if the parameter has been successfully assigned
- * for Annotation Type
+ * @param paramName Parameter Name
+ * @param value Parameter Value
+ * @return <code>true</code> if the parameter has been successfully assigned for Annotation Type
*/
- boolean addParameter(final String paramName, String value);
+ boolean addParameter(String paramName, String value);
/**
* Adds the parameter with specified List of parameter values into List of
* In case that any of parameters contains <code>null</code> the method
* SHOULD thrown {@link IllegalArgumentException}
*
- * @param paramName
- * Parameter Name
- * @param values
- * List of Values bounded to Parameter Name
- * @return <code>true</code> if the parameter has been successfully assigned
- * for Annotation Type
+ * @param paramName Parameter Name
+ * @param values List of Values bounded to Parameter Name
+ * @return <code>true</code> if the parameter has been successfully assigned for Annotation Type
*/
- boolean addParameters(final String paramName, List<String> values);
+ boolean addParameters(String paramName, List<String> values);
/**
* Returns <code>new</code> <i>immutable</i> instance of Annotation Type
public interface ConstantBuilder {
- void assignValue(final Object value);
+ void assignValue(Object value);
Constant toInstance(Type definingType);
}
*/
public interface EnumBuilder extends Type, AnnotableTypeBuilder {
- void setDescription(final String description);
+ void setDescription(String description);
- Enumeration toInstance(final Type definingType);
+ Enumeration toInstance(Type definingType);
/**
* Updates this builder with data from <code>enumTypeDef</code>. Specifically this data represents list
*
* @param enumTypeDef enum type definition as source of enum data for <code>enumBuilder</code>
*/
- void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
+ void updateEnumPairsFromEnumTypeDef(EnumTypeDefinition enumTypeDef);
}
import org.opendaylight.mdsal.binding.model.api.Type;
/**
- * Generated Property Builder is interface that contains methods to build and
- * instantiate Generated Property definition.
+ * Generated Property Builder is interface that contains methods to build and instantiate Generated Property definition.
*
* @see GeneratedProperty
*/
GeneratedPropertyBuilder setValue(String value);
/**
- * Sets isReadOnly flag for property. If property is marked as read only it
- * is the same as set property in java as final.
+ * Sets isReadOnly flag for property. If property is marked as read only it is the same as set property in Java
+ * as final.
*
- * @param isReadOnly
- * Read Only property flag.
+ * @param isReadOnly Read Only property flag.
*/
- GeneratedPropertyBuilder setReadOnly(final boolean isReadOnly);
+ GeneratedPropertyBuilder setReadOnly(boolean isReadOnly);
/**
* Returns <code>new</code> <i>immutable</i> instance of Generated Property. <br>
* as <code>null</code> reference the method SHOULD thrown
* {@link IllegalArgumentException}.
*
- * @param definingType
- * Defining Type of Generated Property
+ * @param definingType Defining Type of Generated Property
* @return <code>new</code> <i>immutable</i> instance of Generated Property.
*/
- GeneratedProperty toInstance(final Type definingType);
+ GeneratedProperty toInstance(Type definingType);
}
Builder<GeneratedTransferObject> {
/**
- * Add Generated Transfer Object from which will be extended current
- * Generated Transfer Object. <br>
- * By definition Java does not allow multiple inheritance, hence if there is
- * already definition of Generated Transfer Object the extending object will
- * be overwritten by lastly added Generated Transfer Object. <br>
- * If Generated Transfer Object is <code>null</code> the method SHOULD throw
- * {@link IllegalArgumentException}
+ * Add Generated Transfer Object from which will be extended current Generated Transfer Object.<br>
+ * By definition Java does not allow multiple inheritance, hence if there is already a definition
+ * of an Generated Transfer Object the extending object will be overwritten by lastly added Generated Transfer
+ * Object.<br>
+ * If Generated Transfer Object is <code>null</code> the method SHOULD throw {@link IllegalArgumentException}
*
- * @param genTransObj
- * Generated Transfer Object
+ * @param genTransObj Generated Transfer Object
* @return This instance of builder
*/
- GeneratedTOBuilder setExtendsType(final GeneratedTransferObject genTransObj);
+ GeneratedTOBuilder setExtendsType(GeneratedTransferObject genTransObj);
/**
* Add Property that will be part of <code>equals</code> definition. <br>
* If Generated Property Builder is <code>null</code> the method SHOULD
* throw {@link IllegalArgumentException}
*
- * @param property
- * Generated Property Builder
+ * @param property Generated Property Builder
* @return This instance of builder
*/
- GeneratedTOBuilder addEqualsIdentity(final GeneratedPropertyBuilder property);
+ GeneratedTOBuilder addEqualsIdentity(GeneratedPropertyBuilder property);
/**
* Add Property that will be part of <code>hashCode</code> definition. <br>
* If Generated Property Builder is <code>null</code> the method SHOULD
* throw {@link IllegalArgumentException}
*
- * @param property
- * Generated Property Builder
+ * @param property Generated Property Builder
* @return This instance of builder
*/
- GeneratedTOBuilder addHashIdentity(final GeneratedPropertyBuilder property);
+ GeneratedTOBuilder addHashIdentity(GeneratedPropertyBuilder property);
/**
* Add Property that will be part of <code>toString</code> definition. <br>
* If Generated Property Builder is <code>null</code> the method SHOULD
* throw {@link IllegalArgumentException}
*
- * @param property
- * Generated Property Builder
+ * @param property Generated Property Builder
* @return This instance of builder
*/
- GeneratedTOBuilder addToStringProperty(final GeneratedPropertyBuilder property);
+ GeneratedTOBuilder addToStringProperty(GeneratedPropertyBuilder property);
void setRestrictions(Restrictions restrictions);
/**
- * Returns instance of <code>GeneratedTransferObject</code> which data are
- * build from the data of this builder
+ * Returns instance of <code>GeneratedTransferObject</code> which data are build from the data of this builder.
*
* @return generated transfer object instance
*/
void setTypedef(boolean isTypedef);
/**
- * Sets the base type for Java representation of YANG typedef
+ * Sets the base type for Java representation of YANG typedef.
*
- * @param typeDef
- * Type Definition
+ * @param typeDef Type Definition
*/
void setBaseType(TypeDefinition<?> typeDef);
boolean isUnion();
/**
+ * Sets the union flag.
*
- * @param isUnion
+ * @param isUnion true if the result is a union type.
*/
void setIsUnion(boolean isUnion);
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type, AnnotableTypeBuilder {
-
/**
- * Adds new Enclosing Transfer Object into definition of Generated Type and
- * returns <code>new</code> Instance of Generated TO Builder. <br>
- * There is no need of specifying of Package Name because enclosing Type is
- * already defined inside Generated Type with specific package name. <br>
- * 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. <br>
- * If the name of enclosing type is <code>null</code> the method SHOULD
- * throw {@link IllegalArgumentException}
+ * Adds new Enclosing Transfer Object into definition of Generated Type and returns <code>new</code> Instance
+ * of Generated TO Builder.<br>
+ * There is no need of specifying of Package Name because enclosing Type is already defined inside Generated Type
+ * with specific package name.<br>
+ * 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.<br>
+ * If the name of enclosing type is <code>null</code> the method SHOULD throw {@link IllegalArgumentException}.
*
- * @param name
- * Name of Enclosing Type
+ * @param name Name of Enclosing Type
* @return <code>new</code> Instance of Generated Type Builder.
*/
GeneratedTOBuilder addEnclosingTransferObject(String name);
/**
- * Adds new Enclosing Transfer Object <code>genTOBuilder</code> into
- * definition of Generated Type
+ * Adds new Enclosing Transfer Object <code>genTOBuilder</code> into definition of Generated Type.
*
* <br>
- * There is no need of specifying of Package Name because enclosing Type is
- * already defined inside Generated Type with specific package name. <br>
- * 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. <br>
- * If the parameter <code>genTOBuilder</code> of enclosing type is
- * <code>null</code> the method SHOULD throw
- * {@link IllegalArgumentException}
- *
- * @param genTOBuilder
- * Name of Enclosing Type
+ * There is no need of specifying of Package Name because enclosing Type is already defined inside Generated Type
+ * with specific package name.<br>
+ * 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.<br>
+ * If the parameter <code>genTOBuilder</code> of enclosing type is <code>null</code> the method SHOULD throw
+ * {@link IllegalArgumentException}.
+ *
+ * @param genTOBuilder Name of Enclosing Type
*/
T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder);
/**
- * Adds String definition of comment into Method Signature definition. <br>
- * The comment String MUST NOT contain any comment specific chars (i.e.
- * "/**" or "//") just plain String text description.
+ * Adds String definition of comment into Method Signature definition.<br>
+ * The comment String MUST NOT contain any comment specific chars (i.e. "/**" or "//") just plain String text
+ * description.
*
- * @param comment
- * Comment String.
+ * @param comment Comment String.
*/
T addComment(TypeComment comment);
boolean isAbstract();
/**
- * Sets the <code>abstract</code> flag to define Generated Type as
- * <i>abstract</i> type.
+ * Sets the <code>abstract</code> flag to define Generated Type as <i>abstract</i> type.
*
- * @param isAbstract
- * abstract flag
+ * @param isAbstract abstract flag
*/
T setAbstract(boolean isAbstract);
/**
* Add Type to implements.
*
- * @param genType
- * Type to implement
+ * @param genType Type to implement
* @return <code>true</code> if the addition of type is successful.
*/
T addImplementsType(Type genType);
/**
- * Adds Constant definition and returns <code>new</code> Constant instance. <br>
- * 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 <code>null</code> and the method SHOULD throw
+ * Adds Constant definition and returns <code>new</code> Constant instance.<br>
+ * 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 <code>null</code> and the method SHOULD throw
* {@link IllegalArgumentException} if the contract is broken.
*
- * @param type
- * Constant Type
- * @param name
- * Name of Constant
- * @param value
- * Assigned Value
+ * @param type Constant Type
+ * @param name Name of Constant
+ * @param value Assigned Value
* @return <code>new</code> Constant instance.
*/
Constant addConstant(Type type, String name, Object value);
/**
- * Adds new Enumeration definition for Generated Type Builder and returns
- * Enum Builder for specifying all Enum parameters. <br>
- * If there is already Enumeration stored with the same name, the old enum
- * will be simply overwritten byt new enum definition. <br>
- * Name of Enumeration cannot be <code>null</code>, if it is
- * <code>null</code> the method SHOULD throw
- * {@link IllegalArgumentException}
+ * Adds new Enumeration definition for Generated Type Builder and returns Enum Builder for specifying all Enum
+ * parameters.<br>
+ * If there is already Enumeration stored with the same name, the old enum will be simply overwritten byt new enum
+ * definition.<br>
+ * Name of Enumeration cannot be <code>null</code>, if it is <code>null</code> the method SHOULD throw
+ * {@link IllegalArgumentException}.
*
- * @param name
- * Enumeration Name
+ * @param name Enumeration Name
* @return <code>new</code> instance of Enumeration Builder.
*/
EnumBuilder addEnumeration(String name);
List<MethodSignatureBuilder> getMethodDefinitions();
/**
- * Add new Method Signature definition for Generated Type Builder and
- * returns Method Signature Builder for specifying all Method parameters. <br>
- * Name of Method cannot be <code>null</code>, if it is <code>null</code>
- * the method SHOULD throw {@link IllegalArgumentException} <br>
+ * Add new Method Signature definition for Generated Type Builder and returns Method Signature Builder
+ * for specifying all Method parameters.<br>
+ * Name of Method cannot be <code>null</code>, if it is <code>null</code> the method SHOULD throw
+ * {@link IllegalArgumentException}.<br>
* By <i>Default</i> the MethodSignatureBuilder SHOULD be pre-set as
- * {@link MethodSignatureBuilder#setAbstract(boolean)},
- * {TypeMemberBuilder#setFinal(boolean)} and
+ * {@link MethodSignatureBuilder#setAbstract(boolean)}, {TypeMemberBuilder#setFinal(boolean)} and
* {TypeMemberBuilder#setAccessModifier(boolean)}
*
- * @param name
- * Name of Method
+ * @param name Name of Method
* @return <code>new</code> instance of Method Signature Builder.
*/
MethodSignatureBuilder addMethod(String name);
/**
- * Checks if GeneratedTypeBuilder contains method with name
- * <code>methodName</code>
+ * Checks if GeneratedTypeBuilder contains method with name <code>methodName</code>.
*
- * @param methodName
- * is method name
+ * @param methodName is method name
*/
boolean containsMethod(String methodName);
Optional<YangSourceDefinition> getYangSourceDefinition();
/**
- * Add new Generated Property definition for Generated Transfer Object
- * Builder and returns Generated Property Builder for specifying Property. <br>
- * Name of Property cannot be <code>null</code>, if it is <code>null</code>
- * the method SHOULD throw {@link IllegalArgumentException}
+ * Add new Generated Property definition for Generated Transfer Object Builder and returns Generated Property
+ * Builder for specifying Property.<br>
+ * Name of Property cannot be <code>null</code>, if it is <code>null</code> the method SHOULD throw
+ * {@link IllegalArgumentException}.
*
- * @param name
- * Name of Property
+ * @param name Name of Property
* @return <code>new</code> instance of Generated Property Builder.
*/
GeneratedPropertyBuilder addProperty(String name);
/**
- * Check whether GeneratedTOBuilder contains property with name
- * <code>name</code>
+ * Check whether GeneratedTOBuilder contains property with name <code>name</code>.
*
- * @param name
- * of property which existance is checked
+ * @param name of property which existence is checked
* @return true if property <code>name</code> exists in list of properties.
*/
boolean containsProperty(String name);
/**
- * Set a string that contains a human-readable textual description of type
- * definition.
+ * Set a string that contains a human-readable textual description of type definition.
*
- * @param description
- * a string that contains a human-readable textual description of
- * type definition.
+ * @param description a string that contains a human-readable textual description of type definition.
*/
void setDescription(String description);
/**
* Set the name of the module, in which generated type was specified.
*
- * @param moduleName
- * the name of the module
+ * @param moduleName the name of the module
*/
void setModuleName(String moduleName);
void setSchemaPath(SchemaPath schemaPath);
/**
- * 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.
+ * 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.
*
- * @param reference
- * a textual cross-reference to an external document.
+ * @param reference a textual cross-reference to an external document.
*/
void setReference(String reference);
* {@link #setComment(String)} can be used as optional because not all methods
* MUST contain annotation or comment definitions.
*
- *
* @see MethodSignature
*/
public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatureBuilder> {
-
/**
* Sets the flag for declaration of method as abstract or non abstract. If
* the flag <code>isAbstract == true</code> The instantiated Method
* Signature MUST have return value for {@link MethodSignature#isAbstract()}
* also equals to <code>true</code>.
*
- * @param isAbstract
- * is abstract flag
+ * @param isAbstract is abstract flag
*/
MethodSignatureBuilder setAbstract(boolean isAbstract);
* In case that any of parameters are defined as <code>null</code> the
* method SHOULD throw an {@link IllegalArgumentException}
*
- * @param type
- * Parameter Type
- * @param name
- * Parameter Name
+ * @param type Parameter Type
+ * @param name Parameter Name
*/
- MethodSignatureBuilder addParameter(final Type type, final String name);
+ MethodSignatureBuilder addParameter(Type type, String name);
/**
* Returns <code>new</code> <i>immutable</i> instance of Method Signature. <br>
* defining Type will be passed as <code>null</code> reference the method
* SHOULD thrown {@link IllegalArgumentException}.
*
- * @param definingType
- * Defining Type of Method Signature
+ * @param definingType Defining Type of Method Signature
* @return <code>new</code> <i>immutable</i> instance of Method Signature.
*/
- MethodSignature toInstance(final Type definingType);
+ MethodSignature toInstance(Type definingType);
}
* Adds return Type into Builder definition for Generated Property. The return Type MUST NOT be <code>null</code>,
* otherwise the method SHOULD throw {@link IllegalArgumentException}
*
- * @param returnType
- * Return Type of property.
+ * @param returnType Return Type of property.
*/
- T setReturnType(final Type returnType);
+ T setReturnType(Type returnType);
AccessModifier getAccessModifier();
/**
* Sets the access modifier of property.
*
- * @param modifier
- * Access Modifier value.
+ * @param modifier Access Modifier value.
*/
- T setAccessModifier(final AccessModifier modifier);
+ T setAccessModifier(AccessModifier modifier);
/**
* Adds String definition of comment into Method Signature definition. The comment String MUST NOT contain any
*
* @param comment Comment String.
*/
- T setComment(final String comment);
+ T setComment(String comment);
/**
* Sets the flag final for method signature. If this is set the method will be prohibited from overriding. This
*
* @param isFinal Is Final
*/
- T setFinal(final boolean isFinal);
+ T setFinal(boolean isFinal);
- T setStatic(final boolean isStatic);
+ T setStatic(boolean isStatic);
}