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 com.google.common.annotations.Beta;
11 import com.google.common.base.Preconditions;
14 * Definition of static property for Binding objects.
17 * This definition consists of
19 * <li>name - property name</li>
20 * <li>type - Java type for property</li>
21 * <li>value - value to which property should be initialized</li>
25 public class StaticBindingProperty {
27 private final String name;
28 private final Class<?> type;
29 private final Object value;
31 public StaticBindingProperty(final String name, final Class<?> type, final Object value) {
32 this.name = Preconditions.checkNotNull(name);
33 this.type = Preconditions.checkNotNull(type);
34 this.value = Preconditions.checkNotNull(value);
37 public String getName() {
41 public Class<?> getType() {
45 public Object getValue() {
50 public int hashCode() {
53 result = prime * result + this.name.hashCode();
58 public boolean equals(final Object obj) {
65 if (getClass() != obj.getClass()) {
68 final StaticBindingProperty other = (StaticBindingProperty) obj;
69 if (!this.name.equals(other.name)) {