Enable checkstyle in mdsal-binding-generator-api 70/76870/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 11 Oct 2018 12:09:40 +0000 (14:09 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 11 Oct 2018 12:32:11 +0000 (14:32 +0200)
This fixes a few violations and flips enforcement on.

Change-Id: Id55c011e8a7f5e85e678aefe793e6aba585ee083
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 files changed:
binding/mdsal-binding-generator-api/pom.xml
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/generator/spi/BindingGeneratorServiceProvider.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/AnnotationType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/CodeGenerator.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Enumeration.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedTransferObject.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/GeneratedType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/JavaTypeName.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/ParameterizedType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/Restrictions.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/WildcardType.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/AnnotableTypeBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/AnnotationTypeBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/ConstantBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/EnumBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedPropertyBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTOBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/MethodSignatureBuilder.java
binding/mdsal-binding-generator-api/src/main/java/org/opendaylight/mdsal/binding/model/api/type/builder/TypeMemberBuilder.java

index 17226607109b9cbcdfa12435250ad07ac485c080..e729332c22446eee8019ba886e0c3a8bb49ed3ee 100644 (file)
             <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>
index 654868659af0f69fa1c023afed8f3e9ecd8196ec..558e005d0f01ee68e2e4dc54ce297086b5c4ed5a 100644 (file)
@@ -9,5 +9,5 @@ package org.opendaylight.mdsal.binding.generator.spi;
 
 public interface BindingGeneratorServiceProvider {
 
-    void registerTypeProvider(final TypeProvider provider);
+    void registerTypeProvider(TypeProvider provider);
 }
index 186ee675af673cd5ece8078a0122b02c5f8f3902..11c5983bafecc4f2500bb4f9549caa9c9e7a2c1d 100644 (file)
@@ -10,32 +10,27 @@ package org.opendaylight.mdsal.binding.model.api;
 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.
@@ -59,18 +54,13 @@ public interface AnnotationType extends 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.
          *
@@ -79,21 +69,17 @@ public interface AnnotationType extends Type {
         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();
     }
index 3e1923f2660c5accf36c8fd25e178d41ad970378..7096d5239abf7a0fb29a972a8aa0dd9d6affed07 100644 (file)
@@ -8,29 +8,23 @@
 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);
@@ -38,10 +32,8 @@ public interface CodeGenerator {
     /**
      * 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);
-
 }
index df76cfff6efc3ae5437433e116c8d07a1e41a9cd..270c146802cf1be880801bb7964e6410cad0caa9 100644 (file)
@@ -14,13 +14,10 @@ import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
  * 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();
@@ -43,15 +40,13 @@ public interface Enumeration extends GeneratedType {
     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();
 
index 264447ab0ad927b8f9891684c736daf9db9bbd59..50994f4d161ca212b4bee90a0945e50d3116c661 100644 (file)
@@ -11,73 +11,60 @@ import java.util.List;
 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();
 
index 0f0bd8684effa2c33e57b69d057be13712c32673..bf74e5c61b5de6287d415e8a06a9321b6b8e7e6c 100644 (file)
@@ -14,34 +14,26 @@ import java.util.Optional;
  * 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();
 
@@ -81,11 +73,9 @@ public interface GeneratedType extends Type, DocumentedType {
     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();
 
@@ -97,20 +87,17 @@ public interface GeneratedType extends Type, DocumentedType {
     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();
 
index 7893682303fe17a6ee41ee6237f511135bc68d53..555bc426f2f174ccd4ef9a2b0cad0972c9d3cf4b 100644 (file)
@@ -265,7 +265,7 @@ public abstract class JavaTypeName implements Identifier, Immutable {
      * @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.
index 42735256e3e198f849d6402d191eb9fef65a93ee..7a56993166e703213c693981bb17ea8a174ac0f0 100644 (file)
@@ -8,20 +8,16 @@
 package org.opendaylight.mdsal.binding.model.api;
 
 /**
- * Represents an instance of simple parametrized type such as List&lt;String&gt;.
- *
- * 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&lt;String&gt;. 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&lt;K,V&gt; 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&lt;K,V&gt;
+     * 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.
index 00de43d38562fab8deda483404bfc0a9a3bff0d4..b6a85dba96b785e36a7568cc06f3b248e7bd3c44 100644 (file)
@@ -16,8 +16,10 @@ import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
 public interface Restrictions {
 
     Optional<LengthConstraint> getLengthConstraint();
+
     List<PatternConstraint> getPatternConstraints();
+
     Optional<? extends RangeConstraint<?>> getRangeConstraint();
-    boolean isEmpty();
 
+    boolean isEmpty();
 }
index ad95a5a21548c45b14f3f758bed668be60622335..40b603843c96bea93a3159c1380b4e638ad41b9c 100644 (file)
@@ -8,9 +8,7 @@
 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 {
 
index d1d3be06fef3e059ac8ad99eeeecdf0f1420c0b4..370f810357a4cf4495ca5179097415679d3e96e1 100644 (file)
@@ -21,7 +21,7 @@ public interface AnnotableTypeBuilder {
      * @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.
index 429c19d25485e22f177c875d6d60a985e14cb7cb..3a5e4b6cd4cf7a1c98ceba766d3691e89c8a1839 100644 (file)
@@ -22,7 +22,6 @@ import org.opendaylight.yangtools.concepts.Builder;
  * @see AnnotationType
  */
 public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
-
     /**
      * The method creates new AnnotationTypeBuilder containing specified package
      * name an annotation name. <br>
@@ -30,13 +29,11 @@ public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
      * 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>
@@ -47,14 +44,11 @@ public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
      * 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
@@ -66,14 +60,11 @@ public interface AnnotationTypeBuilder extends Type, Builder<AnnotationType> {
      * 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
index 0e955dfd2da42b281a4b0bfbde18067f45eb7a07..52af4456eb6ae93977fc51e14d4b7e6e6faeb8cb 100644 (file)
@@ -12,7 +12,7 @@ import org.opendaylight.mdsal.binding.model.api.Type;
 
 public interface ConstantBuilder {
 
-    void assignValue(final Object value);
+    void assignValue(Object value);
 
     Constant toInstance(Type definingType);
 }
index 88eb12c859cbc24a06af82b30333743dcb1e37ad..1815a0904612f7bfadf750cd15ab9a280bd33d2c 100644 (file)
@@ -18,9 +18,9 @@ import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
  */
 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
@@ -28,5 +28,5 @@ public interface EnumBuilder extends Type, AnnotableTypeBuilder {
      *
      * @param enumTypeDef enum type definition as source of enum data for <code>enumBuilder</code>
      */
-    void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
+    void updateEnumPairsFromEnumTypeDef(EnumTypeDefinition enumTypeDef);
 }
index 610992690b6d7a002cb0e31c1764df3da04ae72e..114e37b65157cb381075cc1a9529178509b12ec6 100644 (file)
@@ -11,8 +11,7 @@ import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
 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
  */
@@ -21,13 +20,12 @@ public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPro
     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>
@@ -37,9 +35,8 @@ public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPro
      * 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);
 }
index a604022987f0396f7d49bd1055f8bb27d13e6058..b032d16f1fa1bb04b697641022b2cde8821bf351 100644 (file)
@@ -22,58 +22,51 @@ public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTO
         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
      */
@@ -83,18 +76,18 @@ public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTO
     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);
 
index d07c63a6d6e7f70e8238af0abac731592df77dd9..646175b5cc03c0930b3b682e9bc7a4042f68b30c 100644 (file)
@@ -17,61 +17,50 @@ import org.opendaylight.mdsal.binding.model.api.YangSourceDefinition;
 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);
 
@@ -80,40 +69,33 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
     /**
      * 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);
@@ -121,27 +103,23 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
     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);
 
@@ -155,42 +133,35 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
     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);
 
@@ -202,13 +173,11 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
     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);
 
index e683ebd05447ad4970cb4fb05234fb4b9fc4ba05..316de89c184a240234de78dc2cc8423f2ba65056 100644 (file)
@@ -22,19 +22,16 @@ import org.opendaylight.mdsal.binding.model.api.Type;
  * {@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);
 
@@ -46,12 +43,10 @@ public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatur
      * 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>
@@ -61,9 +56,8 @@ public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatur
      * 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);
 }
index e88b33b70643f8eea376cee59ce0302a39f73a74..ddb84d6eca885f3580f5c5cc6f4a76bacfb1a883 100644 (file)
@@ -22,20 +22,18 @@ public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> extends Annot
      * 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
@@ -43,7 +41,7 @@ public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> extends Annot
      *
      * @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
@@ -52,7 +50,7 @@ public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> extends Annot
      *
      * @param isFinal Is Final
      */
-    T setFinal(final boolean isFinal);
+    T setFinal(boolean isFinal);
 
-    T setStatic(final boolean isStatic);
+    T setStatic(boolean isStatic);
 }