2 * Copyright (c) 2021 PANTHEON.tech, 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.yangtools.yang.parser.spi.meta;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.MoreObjects;
12 import com.google.common.base.MoreObjects.ToStringHelper;
13 import org.opendaylight.yangtools.concepts.Immutable;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
17 * Significant state captured by an {@link EffectiveStatement} at its instantiation site. This can be used to compare
18 * statements which are instantiated through inference, for example through {@code uses} from {@code grouping}s, when
19 * the reactor establishes the two instances have the same substatements.
22 public abstract class EffectiveStatementState implements Immutable {
24 public abstract int hashCode();
27 public abstract boolean equals(Object obj);
30 public final String toString() {
31 return addToStringAttributes(MoreObjects.toStringHelper(this)).toString();
34 protected abstract ToStringHelper addToStringAttributes(ToStringHelper helper);