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.
16 * This definition consists of
18 * <li>name - property name</li>
19 * <li>type - Java type for property</li>
20 * <li>value - value to which property should be initialized</li>
23 public class StaticConstantDefinition {
25 private final String name;
26 private final Class<?> type;
27 private final Object value;
29 public StaticConstantDefinition(final String name, final Class<?> type, final Object value) {
30 this.name = Preconditions.checkNotNull(name);
31 this.type = Preconditions.checkNotNull(type);
32 this.value = Preconditions.checkNotNull(value);
35 public String getName() {
39 public Class<?> getType() {
43 public Object getValue() {
48 public int hashCode() {
51 result = prime * result + name.hashCode();
56 public boolean equals(final Object obj) {
63 if (getClass() != obj.getClass()) {
66 StaticConstantDefinition other = (StaticConstantDefinition) obj;
67 if (!name.equals(other.name)) {