Clean up GeneratedProperty use
[mdsal.git] / binding / mdsal-binding-generator-api / src / main / java / org / opendaylight / mdsal / 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.mdsal.binding.model.api.type.builder;
9
10 import org.opendaylight.mdsal.binding.model.api.GeneratedProperty;
11 import org.opendaylight.mdsal.binding.model.api.Type;
12
13 /**
14  * Generated Property Builder is interface that contains methods to build and instantiate Generated Property definition.
15  *
16  * @see GeneratedProperty
17  */
18 public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
19
20     GeneratedPropertyBuilder setValue(String value);
21
22     /**
23      * Sets isReadOnly flag for property. If property is marked as read only it is the same as set property in Java
24      * as final.
25      *
26      * @param isReadOnly Read Only property flag.
27      */
28     GeneratedPropertyBuilder setReadOnly(boolean isReadOnly);
29
30     /**
31      * Returns <code>new</code> <i>immutable</i> instance of Generated Property. <br>
32      * The <code>definingType</code> param cannot be <code>null</code>. The
33      * every member in Java MUST be declared and defined inside the scope of
34      * <code>class</code> definition. In case that defining Type will be passed
35      * as <code>null</code> reference the method SHOULD thrown
36      * {@link IllegalArgumentException}.
37      *
38      * @param definingType Defining Type of Generated Property
39      * @return <code>new</code> <i>immutable</i> instance of Generated Property.
40      */
41     GeneratedProperty toInstance(Type definingType);
42 }