2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.mdsal.binding2.model.api.type.builder;
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding2.model.api.GeneratedProperty;
13 import org.opendaylight.mdsal.binding2.model.api.Type;
16 * Generated Property Builder is interface that contains methods to build and
17 * instantiate Generated Property definition.
19 * @see GeneratedProperty
22 public interface GeneratedPropertyBuilder extends TypeMemberBuilder<GeneratedPropertyBuilder> {
24 GeneratedPropertyBuilder setValue(String value);
27 * Sets isReadOnly flag for property. If property is marked as read only it
28 * is the same as set property in java as final.
31 * Read Only property flag.
33 GeneratedPropertyBuilder setReadOnly(final boolean isReadOnly);
36 * Returns <code>new</code> <i>immutable</i> instance of Generated Property. <br>
37 * The <code>definingType</code> param cannot be <code>null</code>. The
38 * every member in Java MUST be declared and defined inside the scope of
39 * <code>class</code> definition. In case that defining Type will be passed
40 * as <code>null</code> reference the method SHOULD thrown
41 * {@link IllegalArgumentException}.
44 * Defining Type of Generated Property
45 * @return <code>new</code> <i>immutable</i> instance of Generated Property.
47 GeneratedProperty toInstance(final Type definingType);