2 * Copyright (c) 2013 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
8 package org.opendaylight.mdsal.binding.model.api;
11 * Generated Property extends {@link TypeMember} interface with additional information about fields (and other members)
12 * declared in Java Transfer Objects (or any java classes) and their access counterparts (getters and setters).
16 // FIXME: 7.0.0: this interface (and others) need to be refactored:
17 // - getValue() is pretty much unused and its semantics are undefined
18 // - isReadOnly() is not related to getValue() and is not used together
19 // - nullifyEmpty() is applicable only to collection types and implies non-read-only and without value
20 // - this is misused by Builder spec :(
21 public interface GeneratedProperty extends TypeMember {
26 * Returns <code>true</code> if the property is declared as read-only. If this {@code true} the property should be
27 * generated with only a getter.
29 * @return {@code true<} if the property is declared as read-only.
34 * Returns indication whether the value should be squashed from empty collection to a null. This property is valid
35 * only if {@link #getReturnType()} results in a well-known collection type: List or Map.
37 * @return True if empty collections should be turned to nulls
39 boolean nullifyEmpty();