Merge "HostTracker StaticHost changes"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-model-api / src / main / java / org / opendaylight / controller / sal / binding / model / api / type / builder / GeneratedPropertyBuilder.java
1 /*
2   * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3   *
4   * This program and the accompanying materials are made available under the
5   * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6   * and is available at http://www.eclipse.org/legal/epl-v10.html
7   */
8 package org.opendaylight.controller.sal.binding.model.api.type.builder;
9
10 import org.opendaylight.controller.sal.binding.model.api.GeneratedProperty;
11 import org.opendaylight.controller.sal.binding.model.api.Type;
12
13 /**
14  * Generated Property Builder is interface that contains methods to build and
15  * instantiate Generated Property definition.
16  *
17  * @see GeneratedProperty
18  */
19 public interface GeneratedPropertyBuilder extends TypeMemberBuilder {
20
21     /**
22      * Sets isReadOnly flag for property. If property is marked as read only
23      * it is the same as set property in java as final.
24      *
25      * @param isReadOnly Read Only property flag.
26      */
27     public void setReadOnly(final boolean isReadOnly);
28
29     /**
30      * Returns <code>new</code> <i>immutable</i> instance of Generated
31      * Property.
32      * <br>
33      * The <code>definingType</code> param cannot be <code>null</code>. The
34      * every member in Java MUST be declared and defined inside the scope of
35      * <code>class</code> definition. In case that
36      * defining Type will be passed as <code>null</code> reference the method
37      * SHOULD thrown {@link IllegalArgumentException}.
38      *
39      * @param definingType Defining Type of Generated Property
40      * @return <code>new</code> <i>immutable</i> instance of Generated
41      * Property.
42      */
43     public GeneratedProperty toInstance(final Type definingType);
44 }