2 * Copyright (c) 2014 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.dom.codec.gen.spi;
10 import com.google.common.base.Preconditions;
13 * Definition of static property for generated class
15 * This definition consists of
17 * <li>name - property name</li>
18 * <li>type - Java type for property</li>
19 * <li>value - value to which property should be initialized</li>
22 public class StaticConstantDefinition {
24 private final String name;
25 private final Class<?> type;
26 private final Object value;
28 public StaticConstantDefinition(final String name, final Class<?> type, final Object value) {
29 this.name = Preconditions.checkNotNull(name);
30 this.type = Preconditions.checkNotNull(type);
31 this.value = Preconditions.checkNotNull(value);
34 public String getName() {
38 public Class<?> getType() {
42 public Object getValue() {
47 public int hashCode() {
50 result = prime * result + name.hashCode();
55 public boolean equals(final Object obj) {
62 if (getClass() != obj.getClass()) {
65 StaticConstantDefinition other = (StaticConstantDefinition) obj;
66 if (!name.equals(other.name)) {