Fixing sonar issues 2
[mdsal.git] / code-generator / binding-model-api / src / main / java / org / opendaylight / yangtools / sal / binding / model / api / type / builder / GeneratedTypeBuilder.java
index d7d78f466c0bfcff6d7e1d229901b0744428d9fb..9756bd209250b207e0689bc841fd1ce5bc185903 100644 (file)
-/*\r
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.yangtools.sal.binding.model.api.type.builder;\r
-\r
-import org.opendaylight.yangtools.sal.binding.model.api.Constant;\r
-import org.opendaylight.yangtools.sal.binding.model.api.GeneratedType;\r
-import org.opendaylight.yangtools.sal.binding.model.api.Type;\r
-\r
-/**\r
- * Generated Type Builder interface is helper interface for building and\r
- * defining the GeneratedType.\r
- * \r
- * @see GeneratedType\r
- */\r
-public interface GeneratedTypeBuilder extends Type {\r
-\r
-    /**\r
-     * Adds new Enclosing Type into definition of Generated Type and returns\r
-     * <code>new</code> Instance of Generated Type Builder. <br>\r
-     * There is no need of specifying of Package Name because enclosing Type is\r
-     * already defined inside Generated Type with specific package name. <br>\r
-     * The name of enclosing Type cannot be same as Name of parent type and if\r
-     * there is already defined enclosing type with the same name, the new\r
-     * enclosing type will simply overwrite the older definition. <br>\r
-     * If the name of enclosing type is <code>null</code> the method SHOULD\r
-     * throw {@link IllegalArgumentException}\r
-     * \r
-     * @param name\r
-     *            Name of Enclosing Type\r
-     * @return <code>new</code> Instance of Generated Type Builder.\r
-     */\r
-    public GeneratedTypeBuilder addEnclosingType(final String name);\r
-\r
-    /**\r
-     * Adds new Enclosing Transfer Object into definition of Generated Type and\r
-     * returns <code>new</code> Instance of Generated TO Builder. <br>\r
-     * There is no need of specifying of Package Name because enclosing Type is\r
-     * already defined inside Generated Type with specific package name. <br>\r
-     * The name of enclosing Type cannot be same as Name of parent type and if\r
-     * there is already defined enclosing type with the same name, the new\r
-     * enclosing type will simply overwrite the older definition. <br>\r
-     * If the name of enclosing type is <code>null</code> the method SHOULD\r
-     * throw {@link IllegalArgumentException}\r
-     * \r
-     * @param name\r
-     *            Name of Enclosing Type\r
-     * @return <code>new</code> Instance of Generated Type Builder.\r
-     */\r
-    public GeneratedTOBuilder addEnclosingTransferObject(final String name);\r
-\r
-    /**\r
-     * Adds new Enclosing Transfer Object <code>genTOBuilder</code> into\r
-     * definition of Generated Type\r
-     * \r
-     * <br>\r
-     * There is no need of specifying of Package Name because enclosing Type is\r
-     * already defined inside Generated Type with specific package name. <br>\r
-     * The name of enclosing Type cannot be same as Name of parent type and if\r
-     * there is already defined enclosing type with the same name, the new\r
-     * enclosing type will simply overwrite the older definition. <br>\r
-     * If the parameter <code>genTOBuilder</code> of enclosing type is\r
-     * <code>null</code> the method SHOULD throw\r
-     * {@link IllegalArgumentException}\r
-     * \r
-     * @param <code>genTOBuilder</code> Name of Enclosing Type\r
-     */\r
-    public void addEnclosingTransferObject(final GeneratedTOBuilder genTOBuilder);\r
-\r
-    /**\r
-     * Adds String definition of comment into Method Signature definition. <br>\r
-     * The comment String MUST NOT contain anny comment specific chars (i.e.\r
-     * "/**" or "//") just plain String text description.\r
-     * \r
-     * @param comment\r
-     *            Comment String.\r
-     */\r
-    public void addComment(final String comment);\r
-\r
-    /**\r
-     * The method creates new AnnotationTypeBuilder containing specified package\r
-     * name an annotation name. <br>\r
-     * Neither the package name or annotation name can contain <code>null</code>\r
-     * references. In case that any of parameters contains <code>null</code> the\r
-     * method SHOULD thrown {@link IllegalArgumentException}\r
-     * \r
-     * @param packageName\r
-     *            Package Name of Annotation Type\r
-     * @param name\r
-     *            Name of Annotation Type\r
-     * @return <code>new</code> instance of Annotation Type Builder.\r
-     */\r
-    public AnnotationTypeBuilder addAnnotation(final String packageName, final String name);\r
-\r
-    /**\r
-     * Sets the <code>abstract</code> flag to define Generated Type as\r
-     * <i>abstract</i> type.\r
-     * \r
-     * @param isAbstract\r
-     *            abstract flag\r
-     */\r
-    public void setAbstract(boolean isAbstract);\r
-\r
-    /**\r
-     * Add Type to implements.\r
-     * \r
-     * @param genType\r
-     *            Type to implement\r
-     * @return <code>true</code> if the addition of type is successful.\r
-     */\r
-    public boolean addImplementsType(final Type genType);\r
-\r
-    /**\r
-     * Adds Constant definition and returns <code>new</code> Constant instance. <br>\r
-     * By definition Constant MUST be defined by return Type, Name and assigned\r
-     * value. The name SHOULD be defined with cpaital letters. Neither of method\r
-     * parameters can be <code>null</code> and the method SHOULD throw\r
-     * {@link IllegalArgumentException} if the contract is broken.\r
-     * \r
-     * @param type\r
-     *            Constant Type\r
-     * @param name\r
-     *            Name of Constant\r
-     * @param value\r
-     *            Assigned Value\r
-     * @return <code>new</code> Constant instance.\r
-     */\r
-    public Constant addConstant(final Type type, final String name, final Object value);\r
-\r
-    /**\r
-     * Adds new Enumeration definition for Generated Type Builder and returns\r
-     * Enum Builder for specifying all Enum parameters. <br>\r
-     * If there is already Enumeration stored with the same name, the old enum\r
-     * will be simply overwritten byt new enum definition. <br>\r
-     * Name of Enumeration cannot be <code>null</code>, if it is\r
-     * <code>null</code> the method SHOULD throw\r
-     * {@link IllegalArgumentException}\r
-     * \r
-     * @param name\r
-     *            Enumeration Name\r
-     * @return <code>new</code> instance of Enumeration Builder.\r
-     */\r
-    public EnumBuilder addEnumeration(final String name);\r
-\r
-    /**\r
-     * Add new Method Signature definition for Generated Type Builder and\r
-     * returns Method Signature Builder for specifying all Method parameters. <br>\r
-     * Name of Method cannot be <code>null</code>, if it is <code>null</code>\r
-     * the method SHOULD throw {@link IllegalArgumentException} <br>\r
-     * By <i>Default</i> the MethodSignatureBuilder SHOULD be pre-set as\r
-     * {@link MethodSignatureBuilder#setAbstract(true)},\r
-     * {@link MethodSignatureBuilder#setFinal(false)} and\r
-     * {@link MethodSignatureBuilder#setAccessModifier(PUBLIC)}\r
-     * \r
-     * @param name\r
-     *            Name of Method\r
-     * @return <code>new</code> instance of Method Signature Builder.\r
-     */\r
-    public MethodSignatureBuilder addMethod(final String name);\r
-\r
-    /**\r
-     * Checks if GeneratedTypeBuilder contains method with name\r
-     * <code>methodName</code>\r
-     * \r
-     * @param methodName\r
-     *            is method name\r
-     */\r
-    public boolean containsMethod(final String methodName);\r
-    \r
-    /**\r
-     * Add new Generated Property definition for Generated Transfer Object\r
-     * Builder and returns Generated Property Builder for specifying Property. <br>\r
-     * Name of Property cannot be <code>null</code>, if it is <code>null</code>\r
-     * the method SHOULD throw {@link IllegalArgumentException}\r
-     * \r
-     * @param name\r
-     *            Name of Property\r
-     * @return <code>new</code> instance of Generated Property Builder.\r
-     */\r
-    public GeneratedPropertyBuilder addProperty(final String name);\r
-\r
-    /**\r
-     * Check whether GeneratedTOBuilder contains property with name\r
-     * <code>name</code>\r
-     * \r
-     * @param name\r
-     *            of property which existance is checked\r
-     * @return true if property <code>name</code> exists in list of properties.\r
-     */\r
-    public boolean containsProperty(final String name);\r
-\r
-    /**\r
-     * Returns the <code>new</code> <i>immutable</i> instance of Generated Type.\r
-     * \r
-     * @return the <code>new</code> <i>immutable</i> instance of Generated Type.\r
-     */\r
-    public GeneratedType toInstance();\r
-}\r
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.sal.binding.model.api.type.builder;
+
+import org.opendaylight.yangtools.sal.binding.model.api.GeneratedType;
+
+/**
+ * Generated Type Builder interface is helper interface for building and
+ * defining the GeneratedType.
+ * 
+ * @see GeneratedType
+ */
+public interface GeneratedTypeBuilder extends GeneratedTypeBuilderBase<GeneratedTypeBuilder> {
+
+    /**
+     * Returns the <code>new</code> <i>immutable</i> instance of Generated Type.
+     * 
+     * @return the <code>new</code> <i>immutable</i> instance of Generated Type.
+     */
+    GeneratedType toInstance();
+
+}