2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.javav2.dom.codec.generator.impl;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
15 * Definition of static property for Binding objects.
18 * This definition consists of
20 * <li>name - property name</li>
21 * <li>type - Java type for property</li>
22 * <li>value - value to which property should be initialized</li>
26 public class StaticBindingProperty {
28 private final String name;
29 private final Class<?> type;
30 private final Object value;
32 public StaticBindingProperty(final String name, final Class<?> type, final Object value) {
33 this.name = requireNonNull(name);
34 this.type = requireNonNull(type);
35 this.value = requireNonNull(value);
38 public String getName() {
42 public Class<?> getType() {
46 public Object getValue() {
51 public int hashCode() {
54 result = prime * result + this.name.hashCode();
59 public boolean equals(final Object obj) {
66 if (getClass() != obj.getClass()) {
69 final StaticBindingProperty other = (StaticBindingProperty) obj;
70 if (!this.name.equals(other.name)) {