Most packages still contain yangtools in the package name in mdsal which seems to be
a by-product of cleaning up of the Java Binding code from YANG Tools to md-sal.
The APIs are copied to new package.
Added deprecated annotation to the old api.
Deleted pkg org.opendaylight.yangtools.sal.binding.model.api.type.provider
Change-Id: Ic120a7ec1f85d8f604aa575047d8bd639630517b
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.api;
+
+import java.util.List;
+import java.util.Set;
+
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.Module;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+
+/**
+ * Transform Schema Context to Generated types.
+ *
+ */
+public interface BindingGenerator {
+
+ /**
+ * Generate Types from whole Schema Context. <br>
+ * The method will return List of All Generated Types that could be
+ * Generated from Schema Context.
+ *
+ *
+ * @param context
+ * Schema Context
+ * @return List of Generated Types
+ *
+ * @see SchemaContext
+ */
+ List<Type> generateTypes(final SchemaContext context);
+
+ /**
+ * Generate Types from Schema Context restricted by sub set of specified
+ * Modules. The Schema Context MUST contain all of the sub modules otherwise
+ * the there is no guarantee that result List of Generated Types will
+ * contain correct Generated Types.
+ *
+ * @param context
+ * Schema Context
+ * @param modules
+ * Sub Set of Modules
+ * @return List of Generated Types restricted by sub set of Modules
+ *
+ * @see Module
+ * @see SchemaContext
+ *
+ */
+ List<Type> generateTypes(final SchemaContext context, final Set<Module> modules);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.api;
+
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface ClassLoadingStrategy {
+
+ Class<?> loadClass(Type type) throws ClassNotFoundException;
+
+ Class<?> loadClass(String fullyQualifiedName) throws ClassNotFoundException;
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.api;
+
+import org.opendaylight.yangtools.concepts.ObjectRegistration;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+
+public interface ModuleInfoRegistry {
+
+ ObjectRegistration<YangModuleInfo> registerModuleInfo(YangModuleInfo yangModuleInfo);
+}
* 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.provider;
\ No newline at end of file
+package org.opendaylight.mdsal.binding.generator.api;
\ No newline at end of file
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.spi;
+
+public interface BindingGeneratorServiceProvider {
+
+ void registerTypeProvider(final TypeProvider provider);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.spi;
+
+import org.opendaylight.mdsal.binding.model.api.Restrictions;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaNode;
+import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+
+public interface TypeProvider {
+
+ /**
+ * Resolve of yang Type Definition to it's java counter part.
+ * If the Type Definition contains one of yang primitive types the method
+ * will return java.lang. counterpart. (For example if yang type is int32
+ * the java counterpart is java.lang.Integer). In case that Type
+ * Definition contains extended type defined via yang typedef statement
+ * the method SHOULD return Generated Type or Generated Transfer Object
+ * if that Type is correctly referenced to resolved imported yang module.
+ * The method will return <code>null</code> value in situations that
+ * TypeDefinition can't be resolved (either due missing yang import or
+ * incorrectly specified type).
+ *
+ *
+ * @param type Type Definition to resolve from
+ * @return Resolved Type
+ */
+ Type javaTypeForSchemaDefinitionType(final TypeDefinition<?> type, final SchemaNode parentNode);
+
+ Type javaTypeForSchemaDefinitionType(final TypeDefinition<?> type, final SchemaNode parentNode, final Restrictions restrictions);
+
+ /**
+ * Returns string containing code for creation of new type instance.
+ *
+ * @param node
+ * @return
+ */
+ String getTypeDefaultConstruction(LeafSchemaNode node);
+
+ String getConstructorPropertyName(SchemaNode node);
+
+ String getParamNameFromType(TypeDefinition<?> type);
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.spi;
+
+import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
+
+//FIXME not implemented anywhere
+public interface TypeProviderFactory {
+
+ TypeProvider providerFor(ModuleIdentifier module);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.generator.spi;
\ No newline at end of file
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+/**
+ * Enum definition which provides four access modifiers that are described
+ * in Java programming language (Default, Private, Protected, Public).
+ */
+public enum AccessModifier {
+ DEFAULT,
+ PRIVATE,
+ PUBLIC,
+ PROTECTED
+}
--- /dev/null
+/*
+ * 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.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.
+ */
+public interface AnnotationType extends Type {
+
+ /**
+ * Returns the List of Annotations. <br>
+ * 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.
+ *
+ * @param paramName
+ * Parameter Name
+ * @return Parameter Definition assigned for given parameter name.
+ */
+ Parameter getParameter(final String paramName);
+
+ /**
+ * Returns List of all parameters assigned to Annotation Type.
+ *
+ * @return List of all parameters assigned to Annotation Type.
+ */
+ List<Parameter> getParameters();
+
+ /**
+ * Returns List of parameter names.
+ *
+ * @return List of parameter names.
+ */
+ List<String> getParameterNames();
+
+ /**
+ * Returns <code>true</code> if annotation contains parameters.
+ *
+ * @return <code>true</code> if annotation contains parameters.
+ */
+ 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.
+ */
+ interface Parameter {
+
+ /**
+ * Returns the Name of the parameter.
+ *
+ * @return the Name of the parameter.
+ */
+ String getName();
+
+ /**
+ * 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.
+ *
+ * @return List of Parameter assigned values in order in which they were
+ * assigned for given parameter name.
+ */
+ List<String> getValues();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 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.mdsal.binding.model.api;
+
+/**
+ * The BaseTypeWithRestrictions is marker interface that encapsulates definition of java
+ * concrete type only with changed restriction values.
+ */
+public interface BaseTypeWithRestrictions extends ConcreteType {
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import org.opendaylight.yangtools.sal.binding.model.api.Type;
+
+/**
+ * Transformas data to concrete code in a programming language.
+ */
+public interface CodeGenerator {
+
+ /**
+ * Generates code for <code>type</code>.
+ *
+ * @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)
+ *
+ * @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
+ * @return name of generated unit
+ */
+ String getUnitName(Type type);
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+/**
+ * The Concrete Type is marker interface that encapsulates definition of java
+ * concrete type.
+ */
+public interface ConcreteType extends Type {
+
+ Restrictions getRestrictions();
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+/**
+ * Interface Contact is designed to hold and model java constant. In Java there
+ * are no constant keywords instead of the constant is defined as static final
+ * field with assigned value. For this purpose the Constant interface contains
+ * methods {@link #getType()} to provide wrapped return Type of Constant,
+ * {@link #getName()} the Name of constant and the {@link #getValue()} for
+ * providing of value assigned to Constant. To determine of which type the
+ * constant value is it is recommended firstly to retrieve Type from constant.
+ * The Type interface holds base information like java package name and java
+ * type name (e.g. fully qualified name). From this string user should be able
+ * to determine to which type can be {@link #getValue()} type typecasted to
+ * unbox and provide value assigned to constant.
+ */
+public interface Constant {
+
+ /**
+ * Returns the Type that declares constant.
+ *
+ * @return the Type that declares constant.
+ */
+ Type getDefiningType();
+
+ /**
+ * Returns the return Type (or just Type) of the Constant.
+ *
+ * @return the return Type (or just Type) of the Constant.
+ */
+ Type getType();
+
+ /**
+ * Returns the name of constant. <br>
+ * By conventions the name SHOULD be in CAPITALS separated with underscores.
+ *
+ * @return the name of constant.
+ */
+ String getName();
+
+ /**
+ * Returns boxed value that is assigned for context.
+ *
+ * @return boxed value that is assigned for context.
+ */
+ Object getValue();
+
+ /**
+ * Returns Constant definition in formatted string. <br>
+ * <br>
+ * The expected string SHOULD be in format: <code>public final
+ * static [Type] CONSTANT_NAME = [value];</code>
+ *
+ * @return Constant definition in formatted string.
+ */
+ String toFormattedString();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import org.opendaylight.yangtools.yang.common.QName;
+
+/**
+ * Implementing this interface allows an object to hold information which are
+ * essential for generating java doc from type definition.
+ */
+public interface DocumentedType {
+
+ /**
+ * Returns a string that contains a human-readable textual description of
+ * type definition.
+ *
+ * @return a human-readable textual description of type definition.
+ */
+ String getDescription();
+
+ /**
+ * Returns 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.
+ *
+ * @return a textual cross-reference to an external document.
+ */
+ String getReference();
+
+ /**
+ * Returns a list of QNames which represent schema path in schema tree from
+ * actual concrete type to the root.
+ *
+ * @return a schema path in schema tree from actual concrete schema node
+ * identifier to the root.
+ */
+ Iterable<QName> getSchemaPath();
+
+ /**
+ * Returns the name of the module, in which generated type was specified.
+ *
+ * @return the name of the module, in which generated type was specified.
+ */
+ String getModuleName();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import java.util.List;
+
+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();
+
+ @Override
+ Type getParentType();
+
+ /**
+ * Returns list of the couples - name and value.
+ *
+ * @return list of the enumeration pairs.
+ */
+ List<Pair> getValues();
+
+ /**
+ * Formats enumeration according to rules of the programming language.
+ *
+ * @return string with source code in some programming language
+ */
+ String toFormattedString();
+
+ /**
+ * Interface is used for reading enumeration item. It means item's name and
+ * its value.
+ */
+ interface Pair extends DocumentedNode {
+
+ /**
+ * 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.
+ */
+ String getName();
+
+ /**
+ * Returns the binding representation for the name of the enumeration item.
+ *
+ * @return the binding representation for the name of the enumeration item.
+ */
+ String getMappedName();
+
+ /**
+ * Returns value of the enumeration item.
+ *
+ * @return the value of the enumeration item.
+ */
+ int getValue();
+ }
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+/**
+ * Generated Property extends interface {@link MethodSignature} interface. <br>
+ * The Generated Property interface is designed to store information of fields
+ * (or members) declared in Java Transfer Objects (or any java classes) and
+ * their access counterparts (getters and setters).
+ *
+ * @see MethodSignature
+ */
+public interface GeneratedProperty extends TypeMember {
+
+ String getValue();
+
+ /**
+ * Returns <code>true</code> if the property si declared as read-only. <br>
+ * If the property has flag <code>isReadOnly == true</code> the property
+ * SHOULD be generated as getter only.
+ *
+ * @return <code>true</code> if the property si declared as read-only.
+ */
+ boolean isReadOnly();
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 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.mdsal.binding.model.api;
+
+public interface GeneratedTransferIdentityObject extends GeneratedTransferObject {
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+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 ()}.
+ *
+ */
+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.
+ *
+ * @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.
+ *
+ * @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.
+ *
+ * @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.
+ *
+ * @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
+ *
+ * @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 true value if Generated Transfer Object was created from union
+ * YANG type.
+ */
+ boolean isUnionType();
+
+ boolean isUnionTypeBuilder();
+
+ Restrictions getRestrictions();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * 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>
+ * </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.
+ */
+public interface GeneratedType extends Type, DocumentedType {
+
+ /**
+ * 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>
+ */
+ Type getParentType();
+
+ /**
+ * Returns comment string associated with Generated Type.
+ *
+ * @return comment string associated with Generated Type.
+ */
+ String getComment();
+
+ /**
+ * Returns List of annotation definitions associated with generated type.
+ *
+ * @return List of annotation definitions associated with generated type.
+ */
+ List<AnnotationType> getAnnotations();
+
+ /**
+ * Returns <code>true</code> if The Generated Type is defined as abstract.
+ *
+ * @return <code>true</code> if The Generated Type is defined as abstract.
+ */
+ boolean isAbstract();
+
+ /**
+ * Returns List of Types that Generated Type will implement.
+ *
+ * @return List of Types that Generated Type will implement.
+ */
+ List<Type> getImplements();
+
+ /**
+ * Returns List of enclosing Generated Types.
+ *
+ * @return List of enclosing Generated Types.
+ */
+ List<GeneratedType> getEnclosedTypes();
+
+ /**
+ * Returns List of all Enumerator definitions associated with Generated
+ * Type.
+ *
+ * @return List of all Enumerator definitions associated with Generated
+ * Type.
+ */
+ List<Enumeration> getEnumerations();
+
+ /**
+ * Returns List of Constant definitions associated with Generated Type.
+ *
+ * @return List of Constant definitions associated with Generated Type.
+ */
+ List<Constant> getConstantDefinitions();
+
+ /**
+ * Returns List of Method Definitions associated with Generated Type.
+ *
+ * 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.
+ *
+ * @return List of Properties that are declared for Generated Transfer
+ * Object.
+ */
+ List<GeneratedProperty> getProperties();
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * The Method Signature interface contains simplified meta model for java method
+ * definition. Each method MUST be defined by name, return type, parameters and
+ * access modifier. <br>
+ * Additionally method MAY contain associated annotations and comment. By
+ * contract if method does not contain any comments or annotation definitions
+ * the {@link #getComment()} SHOULD rather return empty string and
+ * {@link #getAnnotations()} SHOULD rather return empty list than
+ * <code>null</code> values. <br>
+ * The defining Type contains the reference to Generated Type that declares
+ * Method Signature.
+ */
+public interface MethodSignature extends TypeMember {
+
+ /**
+ * Returns <code>true</code> if the method signature is defined as abstract. <br>
+ * By default in java all method declarations in interface are defined as
+ * abstract, but the user don't need necessary to declare abstract keyword
+ * in front of each method. <br>
+ * The abstract methods are allowed in Class definitions but only when the
+ * class is declared as abstract.
+ *
+ * @return <code>true</code> if the method signature is defined as abstract.
+ */
+ boolean isAbstract();
+
+ /**
+ * Returns the List of parameters that method declare. If the method does
+ * not contain any parameters, the method will return empty List.
+ *
+ * @return the List of parameters that method declare.
+ */
+ List<Parameter> getParameters();
+
+ /**
+ * The Parameter interface is designed to hold the information of method
+ * Parameter(s). The parameter is defined by his Name which MUST be unique
+ * as java does not allow multiple parameters with same names for one method
+ * and Type that is associated with parameter.
+ */
+ interface Parameter {
+
+ /**
+ * Returns the parameter name.
+ *
+ * @return the parameter name.
+ */
+ String getName();
+
+ /**
+ * Returns Type that is bounded to parameter name.
+ *
+ * @return Type that is bounded to parameter name.
+ */
+ Type getType();
+ }
+}
--- /dev/null
+/*
+ * 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.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
+ * 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
+ * the information of generic parameters.)
+ *
+ * @return array of Types that are defined for Parameterized Type.
+ */
+ Type[] getActualTypeArguments();
+
+ /**
+ * Returns the Raw Type definition of Parameterized Type.
+ *
+ * @return the Raw Type definition of Parameterized Type.
+ */
+ Type getRawType();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import java.util.List;
+
+import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
+import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
+import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
+
+public interface Restrictions {
+
+ List<LengthConstraint> getLengthConstraints();
+
+ List<PatternConstraint> getPatternConstraints();
+
+ List<RangeConstraint> getRangeConstraints();
+
+ boolean isEmpty();
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+/**
+ * The Type interface defines the base type for all types defined in java. Each
+ * Type defined in java MUST contain name and package name, except of primitive
+ * types like int, byte etc. In case of mapping of primitive type the package
+ * name MUST be left as empty string.
+ *
+ */
+public interface Type {
+ /**
+ * Returns name of the package that interface belongs to.
+ *
+ * @return name of the package that interface belongs to
+ */
+ String getPackageName();
+
+ /**
+ * Returns name of the interface.
+ *
+ * @return name of the interface.
+ */
+ String getName();
+
+ /**
+ * Returns fully qualified name of Type. <br>
+ * The fully qualified name of Type MUST be returned in following format:
+ * <ul>
+ * <li>If does not contains package name: [type name] (e.g. int, byte,
+ * byte[],...)</li>
+ * <li>If Type contains package name: [package name].[type name] (e.g
+ * java.lang.Byte, org.opendaylight.controller.gen.GenType)</li>
+ * </ul>
+ *
+ * @return fully qualified name of Type.
+ */
+ String getFullyQualifiedName();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
+
+import java.util.List;
+
+/**
+ * Common interface for variables and methods in class.
+ */
+public interface TypeMember {
+
+ /**
+ * Returns comment string associated with member.
+ *
+ * @return comment string associated with member.
+ */
+ String getComment();
+
+ /**
+ * Returns List of annotation definitions associated with generated type.
+ *
+ * @return List of annotation definitions associated with generated type.
+ */
+ List<AnnotationType> getAnnotations();
+
+ /**
+ * Returns the access modifier of member.
+ *
+ * @return the access modifier of member.
+ */
+ AccessModifier getAccessModifier();
+
+ /**
+ * Returns <code>true</code> if member is declared as static.
+ *
+ * @return <code>true</code> if member is declared as static.
+ */
+ boolean isStatic();
+
+ /**
+ * Returns <code>true</code> if member is declared as final.
+ *
+ * @return <code>true</code> if member is declared as final.
+ */
+ boolean isFinal();
+
+ /**
+ * Get the returning Type of member.
+ *
+ * @return the returning Type of member.
+ */
+ Type getReturnType();
+
+ /**
+ * Returns the name of member.
+ *
+ * @return the name of member.
+ */
+ String getName();
+
+ /**
+ * Returns the Type that declares member.
+ *
+ * @return the Type that declares member.
+ */
+ Type getDefiningType();
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 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.mdsal.binding.model.api;
+
+/**
+ *
+ * Marker interface which assign to object property that it is bounded wildcard
+ * type.
+ *
+ */
+public interface WildcardType extends Type {
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api;
\ No newline at end of file
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import java.util.List;
+
+import org.opendaylight.mdsal.binding.model.api.AnnotationType;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+/**
+ * Annotation Type Builder Interface serves for creation and instantiation of
+ * immutable copy of Annotation Type. The Annotation Type Builder extends from
+ * {@link Type} interface. The Annotation Type contains set of methods which are
+ * capable to provide information about other Annotation Types and Annotation
+ * Parameters.
+ *
+ * @see AnnotationType
+ */
+public interface AnnotationTypeBuilder extends Type {
+
+ /**
+ * The method creates new AnnotationTypeBuilder containing specified package
+ * name an annotation name. <br>
+ * Neither the package name or annotation name can contain <code>null</code>
+ * 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
+ * @return <code>new</code> instance of Annotation Type Builder.
+ */
+ AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+
+ /**
+ * Adds the parameter into List of parameters for Annotation Type. <br>
+ * If there is already stored parameter with the same name as the new
+ * parameter, the value of the old one will be simply overwritten by the
+ * newer parameter. <br>
+ * Neither the param name or value can contain <code>null</code> references.
+ * 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
+ */
+ boolean addParameter(final String paramName, String value);
+
+ /**
+ * Adds the parameter with specified List of parameter values into List of
+ * parameters for Annotation Type. <br>
+ * If there is already stored parameter with the same name as the new
+ * parameter, the value of the old one will be simply overwritten by the
+ * newer parameter. <br>
+ * Neither the param name or value can contain <code>null</code> references.
+ * 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
+ */
+ boolean addParameters(final String paramName, List<String> values);
+
+ /**
+ * Returns <code>new</code> <i>immutable</i> instance of Annotation Type
+ * with values assigned in current instance of Annotation Type Builder. <br>
+ * The return Annotation Type instance is immutable thus no additional
+ * modification to Annotation Type Builder will have an impact to
+ * instantiated Annotation Type. <br>
+ * For this purpose call this method after all additions are complete.
+ *
+ * @return <code>new</code> <i>immutable</i> instance of Annotation Type.
+ */
+ AnnotationType toInstance();
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.Constant;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface ConstantBuilder {
+
+ void assignValue(Object value);
+
+ Constant toInstance(Type definingType);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.Enumeration;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
+
+/**
+ * Enum Builder is interface that contains methods to build and instantiate
+ * Enumeration definition.
+ *
+ * @see Enumeration
+ */
+public interface EnumBuilder extends Type {
+
+ /**
+ * The method creates new AnnotationTypeBuilder containing specified package
+ * name an annotation name. <br>
+ * Neither the package name or annotation name can contain <code>null</code>
+ * 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
+ * @return <code>new</code> instance of Annotation Type Builder.
+ */
+ AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+
+ /**
+ *
+ * @param name
+ * @param value
+ */
+ void addValue(final String name, final int value, final String description);
+
+ /**
+ *
+ * @param definingType
+ * @return
+ */
+ Enumeration toInstance(final Type definingType);
+
+ /**
+ * Updates this builder with data from <code>enumTypeDef</code>.
+ * Specifically this data represents list of value-name pairs.
+ *
+ * @param enumTypeDef
+ * enum type definition as source of enum data for
+ * <code>enumBuilder</code>
+ */
+ void updateEnumPairsFromEnumTypeDef(final EnumTypeDefinition enumTypeDef);
+
+ /**
+ * @param description
+ */
+ void setDescription(final String description);
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+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.
+ *
+ * @see GeneratedProperty
+ */
+public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
+
+ 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.
+ *
+ * @param isReadOnly
+ * Read Only property flag.
+ */
+ GeneratedPropertyBuilder setReadOnly(final boolean isReadOnly);
+
+ /**
+ * Returns <code>new</code> <i>immutable</i> instance of Generated Property. <br>
+ * The <code>definingType</code> param cannot be <code>null</code>. The
+ * every member in Java MUST be declared and defined inside the scope of
+ * <code>class</code> definition. In case that defining Type will be passed
+ * as <code>null</code> reference the method SHOULD thrown
+ * {@link IllegalArgumentException}.
+ *
+ * @param definingType
+ * Defining Type of Generated Property
+ * @return <code>new</code> <i>immutable</i> instance of Generated Property.
+ */
+ GeneratedProperty toInstance(final Type definingType);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject;
+import org.opendaylight.mdsal.binding.model.api.Restrictions;
+import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+
+/**
+ * Generated Transfer Object Builder is interface that contains methods to build
+ * and instantiate Generated Transfer Object definition.
+ *
+ * @see GeneratedTransferObject
+ */
+public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTOBuilder> {
+
+ /**
+ * 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}
+ *
+ * @param genTransObj
+ * Generated Transfer Object
+ * @return This instance of builder
+ */
+ GeneratedTOBuilder setExtendsType(final 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
+ * @return This instance of builder
+ */
+ GeneratedTOBuilder addEqualsIdentity(final 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
+ * @return This instance of builder
+ */
+ GeneratedTOBuilder addHashIdentity(final 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
+ * @return This instance of builder
+ */
+ GeneratedTOBuilder addToStringProperty(final GeneratedPropertyBuilder property);
+
+ void setRestrictions(Restrictions restrictions);
+
+ /**
+ * Returns instance of <code>GeneratedTransferObject</code> which data are
+ * build from the data of this builder
+ *
+ * @return generated transfer object instance
+ */
+ GeneratedTransferObject toInstance();
+
+ void setTypedef(boolean isTypedef);
+
+ /**
+ * Sets the base type for Java representation of YANG typedef
+ *
+ * @param typeDef
+ * Type Definition
+ */
+ void setBaseType(TypeDefinition<?> typeDef);
+
+ /**
+ *
+ * @param isUnion
+ */
+ void setIsUnion(boolean isUnion);
+
+ void setIsUnionBuilder(boolean isUnionTypeBuilder);
+
+ void setSUID(GeneratedPropertyBuilder suid);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.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();
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 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.mdsal.binding.model.api.type.builder;
+
+import java.util.List;
+
+import org.opendaylight.mdsal.binding.model.api.Constant;
+import org.opendaylight.mdsal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.common.QName;
+
+public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type {
+
+ /**
+ * 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
+ * @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
+ *
+ * <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
+ */
+ T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder);
+
+ /**
+ * Adds String definition of comment into Method Signature definition. <br>
+ * The comment String MUST NOT contain anny comment specific chars (i.e.
+ * "/**" or "//") just plain String text description.
+ *
+ * @param comment
+ * Comment String.
+ */
+ T addComment(String comment);
+
+ /**
+ * The method creates new AnnotationTypeBuilder containing specified package
+ * name an annotation name. <br>
+ * Neither the package name or annotation name can contain <code>null</code>
+ * 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
+ * @return <code>new</code> instance of Annotation Type Builder.
+ */
+ AnnotationTypeBuilder addAnnotation(String packageName, String name);
+
+ boolean isAbstract();
+
+ /**
+ * Sets the <code>abstract</code> flag to define Generated Type as
+ * <i>abstract</i> type.
+ *
+ * @param isAbstract
+ * abstract flag
+ */
+ T setAbstract(boolean isAbstract);
+
+ List<Type> getImplementsTypes();
+
+ /**
+ * Add Type to implements.
+ *
+ * @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
+ * {@link IllegalArgumentException} if the contract is broken.
+ *
+ * @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}
+ *
+ * @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>
+ * By <i>Default</i> the MethodSignatureBuilder SHOULD be pre-set as
+ * {@link MethodSignatureBuilder#setAbstract(boolean)},
+ * {TypeMemberBuilder#setFinal(boolean)} and
+ * {TypeMemberBuilder#setAccessModifier(boolean)}
+ *
+ * @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>
+ *
+ * @param methodName
+ * is method name
+ */
+ boolean containsMethod(String methodName);
+
+ List<GeneratedPropertyBuilder> getProperties();
+
+ /**
+ * 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
+ * @return <code>new</code> instance of Generated Property Builder.
+ */
+ GeneratedPropertyBuilder addProperty(String name);
+
+ /**
+ * Check whether GeneratedTOBuilder contains property with name
+ * <code>name</code>
+ *
+ * @param name
+ * of property which existance 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.
+ *
+ * @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
+ */
+ void setModuleName(String moduleName);
+
+ /**
+ * Set a list of QNames which represent schema path in schema tree from
+ * actual concrete type to the root.
+ *
+ * @param schemaPath
+ * a list of QNames which represent schema path in schema tree
+ */
+ void setSchemaPath(Iterable<QName> 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.
+ *
+ * @param reference
+ * a textual cross-reference to an external document.
+ */
+ void setReference(String reference);
+
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.MethodSignature;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+/**
+ * Method Signature Builder serves solely for building Method Signature and
+ * returning the <code>new</code> instance of Method Signature. <br>
+ * By definition of {@link MethodSignature} the Method in java MUST contain
+ * Name, Return Type and Access Modifier. By default the Access Modifier can be
+ * set to public. The Method Signature builder does not contain method for
+ * addName due to enforce reason that MethodSignatureBuilder SHOULD be
+ * instantiated only once with defined method name. <br>
+ * The methods as {@link #addAnnotation(String, String)} and
+ * {@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
+ */
+ MethodSignatureBuilder setAbstract(boolean isAbstract);
+
+ /**
+ * Adds Parameter into the List of method parameters. Neither the Name or
+ * Type of parameter can be <code>null</code>.
+ *
+ * <br>
+ * 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
+ */
+ MethodSignatureBuilder addParameter(final Type type, final String name);
+
+ /**
+ * Returns <code>new</code> <i>immutable</i> instance of Method Signature. <br>
+ * The <code>definingType</code> param cannot be <code>null</code>. The
+ * every method in Java MUST be declared and defined inside the scope of
+ * <code>class</code> or <code>interface</code> definition. In case that
+ * defining Type will be passed as <code>null</code> reference the method
+ * SHOULD thrown {@link IllegalArgumentException}.
+ *
+ * @param definingType
+ * Defining Type of Method Signature
+ * @return <code>new</code> <i>immutable</i> instance of Method Signature.
+ */
+ MethodSignature toInstance(final Type definingType);
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 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.mdsal.binding.model.api.type.builder;
+
+import org.opendaylight.mdsal.binding.model.api.AccessModifier;
+import org.opendaylight.mdsal.binding.model.api.Type;
+
+public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
+
+ /**
+ * The method creates new AnnotationTypeBuilder containing specified package
+ * name an annotation name. <br>
+ * Neither the package name or annotation name can contain <code>null</code>
+ * 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
+ * @return <code>new</code> instance of Annotation Type Builder.
+ */
+ AnnotationTypeBuilder addAnnotation(String packageName, String name);
+
+ /**
+ * Returns the name of property.
+ *
+ * @return the name of property.
+ */
+ String getName();
+
+ /**
+ * Adds return Type into Builder definition for Generated Property. <br>
+ * The return Type MUST NOT be <code>null</code>, otherwise the method
+ * SHOULD throw {@link IllegalArgumentException}
+ *
+ * @param returnType
+ * Return Type of property.
+ */
+ T setReturnType(Type returnType);
+
+ AccessModifier getAccessModifier();
+
+ /**
+ * Sets the access modifier of property.
+ *
+ * @param modifier
+ * Access Modifier value.
+ */
+ T setAccessModifier(AccessModifier modifier);
+
+ /**
+ * Adds String definition of comment into Method Signature definition. <br>
+ * The comment String MUST NOT contain anny comment specific chars (i.e.
+ * "/**" or "//") just plain String text description.
+ *
+ * @param comment
+ * Comment String.
+ */
+ T setComment(String comment);
+
+ /**
+ * Sets the flag final for method signature. If this is set the method will
+ * be prohibited from overriding. <br>
+ * This setting is irrelevant for methods designated to be defined in
+ * interface definitions because interface can't have final method.
+ *
+ * @param isFinal
+ * Is Final
+ */
+ T setFinal(boolean isFinal);
+
+ T setStatic(boolean isStatic);
+}
--- /dev/null
+/*
+ * 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.mdsal.binding.model.api.type.builder;
\ No newline at end of file
/**
* Transform Schema Context to Generated types.
- *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.BindingGenerator} instead.
*/
+@Deprecated
public interface BindingGenerator {
/**
* Generate Types from whole Schema Context. <br>
* The method will return List of All Generated Types that could be
* Generated from Schema Context.
- *
- *
+ *
+ *
* @param context
* Schema Context
* @return List of Generated Types
- *
+ *
* @see SchemaContext
*/
List<Type> generateTypes(final SchemaContext context);
* Modules. The Schema Context MUST contain all of the sub modules otherwise
* the there is no guarantee that result List of Generated Types will
* contain correct Generated Types.
- *
+ *
* @param context
* Schema Context
* @param modules
* Sub Set of Modules
* @return List of Generated Types restricted by sub set of Modules
- *
+ *
* @see Module
* @see SchemaContext
- *
+ *
*/
List<Type> generateTypes(final SchemaContext context, final Set<Module> modules);
}
import org.opendaylight.yangtools.sal.binding.model.api.Type;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.ClassLoadingStrategy} instead.
+ */
+@Deprecated
public interface ClassLoadingStrategy {
Class<?> loadClass(Type type) throws ClassNotFoundException;
Class<?> loadClass(String fullyQualifiedName) throws ClassNotFoundException;
-
}
package org.opendaylight.yangtools.sal.binding.generator.api;
-import org.opendaylight.yangtools.concepts.ObjectRegistration;
-import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
-
-public interface ModuleInfoRegistry {
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.api.ModuleInfoRegistry} instead.
+ */
+@Deprecated
+public interface ModuleInfoRegistry extends org.opendaylight.mdsal.binding.generator.api.ModuleInfoRegistry {
- ObjectRegistration<YangModuleInfo> registerModuleInfo(YangModuleInfo yangModuleInfo);
}
*/
package org.opendaylight.yangtools.sal.binding.generator.spi;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.BindingGeneratorServiceProvider} instead.
+ */
+@Deprecated
public interface BindingGeneratorServiceProvider {
void registerTypeProvider(final TypeProvider provider);
import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.TypeProvider} instead.
+ */
+@Deprecated
public interface TypeProvider {
@Deprecated
String getConstructorPropertyName(SchemaNode node);
String getParamNameFromType(TypeDefinition<?> type);
-
}
import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.generator.spi.TypeProviderFactory} instead.
+ */
+@Deprecated
//FIXME not implemented anywhere
public interface TypeProviderFactory {
/**
* Enum definition which provides four access modifiers that are described
* in Java programming language (Default, Private, Protected, Public).
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.AccessModifier} instead.
*/
+@Deprecated
public enum AccessModifier {
DEFAULT, PRIVATE, PUBLIC, PROTECTED
}
* 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.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.AnnotationType} instead.
*/
+@Deprecated
public interface AnnotationType extends Type {
/**
* Returns the List of Annotations. <br>
* 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.
- *
+ *
* @param paramName
* Parameter Name
* @return Parameter Definition assigned for given parameter name.
/**
* Returns List of all parameters assigned to Annotation Type.
- *
+ *
* @return List of all parameters assigned to Annotation Type.
*/
List<Parameter> getParameters();
/**
* Returns List of parameter names.
- *
+ *
* @return List of parameter names.
*/
List<String> getParameterNames();
/**
* Returns <code>true</code> if annotation contains parameters.
- *
+ *
* @return <code>true</code> if annotation contains parameters.
*/
boolean containsParameters();
/**
* Returns the Name of the parameter.
- *
+ *
* @return the Name of the parameter.
*/
String getName();
/**
* 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();
* 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.
*/
/**
* The BaseTypeWithRestrictions is marker interface that encapsulates definition of java
* concrete type only with changed restriction values.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.BaseTypeWithRestrictions} instead.
*/
+@Deprecated
public interface BaseTypeWithRestrictions extends ConcreteType {
}
\ No newline at end of file
/**
* Transformates virtual data to the concrete code in programming language.
- *
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.CodeGenerator} instead.
*/
+@Deprecated
public interface CodeGenerator {
/**
* Generates code for <code>type</code>.
- *
+ *
* @param type
* Input type to be processed
* @return generated JAVA code
/**
* 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
* @return true if type is acceptable for processing.
/**
* Returns name of <code>type</code> parameter.
- *
+ *
* @param type
* Input type to be processed
* @return name of generated unit
/**
* The Concrete Type is marker interface that encapsulates definition of java
* concrete type.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.ConcreteType} instead.
*/
+@Deprecated
public interface ConcreteType extends Type {
Restrictions getRestrictions();
* type name (e.g. fully qualified name). From this string user should be able
* to determine to which type can be {@link #getValue()} type typecasted to
* unbox and provide value assigned to constant.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Constant} instead.
*/
+@Deprecated
public interface Constant {
/**
* Returns the Type that declares constant.
- *
+ *
* @return the Type that declares constant.
*/
Type getDefiningType();
/**
* Returns the return Type (or just Type) of the Constant.
- *
+ *
* @return the return Type (or just Type) of the Constant.
*/
Type getType();
/**
* Returns the name of constant. <br>
* By conventions the name SHOULD be in CAPITALS separated with underscores.
- *
+ *
* @return the name of constant.
*/
String getName();
/**
* Returns boxed value that is assigned for context.
- *
+ *
* @return boxed value that is assigned for context.
*/
Object getValue();
* <br>
* The expected string SHOULD be in format: <code>public final
* static [Type] CONSTANT_NAME = [value];</code>
- *
+ *
* @return Constant definition in formatted string.
*/
String toFormattedString();
/**
* Implementing this interface allows an object to hold information which are
* essential for generating java doc from type definition.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.DocumentedType} instead.
*/
+@Deprecated
public interface DocumentedType {
/**
/**
* Interface provide methods for reading data of enumeration class.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Enumeration} instead.
*/
+@Deprecated
public interface Enumeration extends GeneratedType {
/**
* their access counterparts (getters and setters).
*
* @see MethodSignature
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedProperty} instead.
*/
+@Deprecated
public interface GeneratedProperty extends TypeMember {
String getValue();
*/
package org.opendaylight.yangtools.sal.binding.model.api;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedTransferIdentityObject} instead.
+ */
+@Deprecated
public interface GeneratedTransferIdentityObject extends
GeneratedTransferObject {
* {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
* {@link #getToStringIdentifiers ()}.
*
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedTransferObject} instead.
*/
+@Deprecated
public interface GeneratedTransferObject extends GeneratedType {
GeneratedProperty getSUID();
* 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.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.GeneratedType} instead.
*/
+@Deprecated
public interface GeneratedType extends Type, DocumentedType {
/**
* <code>null</code> values. <br>
* The defining Type contains the reference to Generated Type that declares
* Method Signature.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.MethodSignature} instead.
*/
+@Deprecated
public interface MethodSignature extends TypeMember {
/**
* in front of each method. <br>
* The abstract methods are allowed in Class definitions but only when the
* class is declared as abstract.
- *
+ *
* @return <code>true</code> if the method signature is defined as abstract.
*/
boolean isAbstract();
/**
* Returns the List of parameters that method declare. If the method does
* not contain any parameters, the method will return empty List.
- *
+ *
* @return the List of parameters that method declare.
*/
List<Parameter> getParameters();
/**
* Returns the parameter name.
- *
+ *
* @return the parameter name.
*/
String getName();
/**
* Returns Type that is bounded to parameter name.
- *
+ *
* @return Type that is bounded to parameter name.
*/
Type getType();
* The parametrized 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.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.ParameterizedType} instead.
*/
+@Deprecated
public interface ParameterizedType extends Type {
/**
import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint;
import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint;
+/**
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Restrictions} instead.
+ */
+@Deprecated
public interface Restrictions {
List<LengthConstraint> getLengthConstraints();
* Type defined in java MUST contain name and package name, except of primitive
* types like int, byte etc. In case of mapping of primitive type the package
* name MUST be left as empty string.
- *
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.Type} instead.
*/
+@Deprecated
public interface Type {
/**
* Returns name of the package that interface belongs to.
- *
+ *
* @return name of the package that interface belongs to
*/
String getPackageName();
/**
* Returns name of the interface.
- *
+ *
* @return name of the interface.
*/
String getName();
* <li>If Type contains package name: [package name].[type name] (e.g
* java.lang.Byte, org.opendaylight.controller.gen.GenType)</li>
* </ul>
- *
+ *
* @return fully qualified name of Type.
*/
String getFullyQualifiedName();
/**
* Common interface for variables and methods in class.
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.TypeMember} instead.
*/
+@Deprecated
public interface TypeMember {
/**
package org.opendaylight.yangtools.sal.binding.model.api;
/**
- *
+ *
* Marker interface which assign to object property that it is bounded wildcard
* type.
- *
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.WildcardType} instead.
*/
+@Deprecated
public interface WildcardType extends Type {
}
* {@link Type} interface. The Annotation Type contains set of methods which are
* capable to provide information about other Annotation Types and Annotation
* Parameters.
- *
+ *
* @see AnnotationType
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.AnnotationTypeBuilder} instead.
*/
+@Deprecated
public interface AnnotationTypeBuilder extends Type {
/**
* Neither the package name or annotation name can contain <code>null</code>
* 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
* Neither the param name or value can contain <code>null</code> references.
* In case that any of parameters contains <code>null</code> the method
* SHOULD thrown {@link IllegalArgumentException}
- *
+ *
* @param paramName
* Parameter Name
* @param value
* Neither the param name or value can contain <code>null</code> references.
* In case that any of parameters contains <code>null</code> the method
* SHOULD thrown {@link IllegalArgumentException}
- *
+ *
* @param paramName
* Parameter Name
* @param values
* modification to Annotation Type Builder will have an impact to
* instantiated Annotation Type. <br>
* For this purpose call this method after all additions are complete.
- *
+ *
* @return <code>new</code> <i>immutable</i> instance of Annotation Type.
*/
AnnotationType toInstance();
/**
*
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.ConstantBuilder} instead.
*/
+@Deprecated
public interface ConstantBuilder {
void assignValue(final Object value);
* Enumeration definition.
*
* @see Enumeration
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.EnumBuilder} instead.
*/
+@Deprecated
public interface EnumBuilder extends Type {
/**
* instantiate Generated Property definition.
*
* @see GeneratedProperty
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedPropertyBuilder} instead.
*/
+@Deprecated
public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
GeneratedPropertyBuilder setValue(String value);
* and instantiate Generated Transfer Object definition.
*
* @see GeneratedTransferObject
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTOBuilder} instead.
*/
+@Deprecated
public interface GeneratedTOBuilder extends GeneratedTypeBuilderBase<GeneratedTOBuilder> {
/**
/**
* Generated Type Builder interface is helper interface for building and
* defining the GeneratedType.
- *
+ *
* @see GeneratedType
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilder} instead.
*/
+@Deprecated
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();
import org.opendaylight.yangtools.sal.binding.model.api.Type;
import org.opendaylight.yangtools.yang.common.QName;
+/**
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilderBase} instead.
+ */
+@Deprecated
public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>> extends Type {
/**
*
*
* @see MethodSignature
+ *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.MethodSignatureBuilder} instead.
*/
+@Deprecated
public interface MethodSignatureBuilder extends TypeMemberBuilder<MethodSignatureBuilder> {
/**
import org.opendaylight.yangtools.sal.binding.model.api.Type;
/**
- *
+ * @deprecated Use {@link org.opendaylight.mdsal.binding.model.api.type.builder.TypeMemberBuilder} instead.
*/
+@Deprecated
public interface TypeMemberBuilder<T extends TypeMemberBuilder<T>> {
/**