2 * Copyright (c) 2013 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.yangtools.yang.parser.builder.impl;
10 import com.google.common.collect.ImmutableList;
11 import com.google.common.collect.ImmutableSet;
12 import java.util.List;
13 import java.util.Objects;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
17 import org.opendaylight.yangtools.yang.model.api.GroupingDefinition;
18 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
19 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
20 import org.opendaylight.yangtools.yang.model.api.Status;
21 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
22 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
25 * @deprecated Pre-Beryllium implementation, scheduled for removal.
28 final class RpcDefinitionImpl implements RpcDefinition {
29 private final QName qname;
30 private final SchemaPath path;
34 private ContainerSchemaNode input;
35 private ContainerSchemaNode output;
36 ImmutableSet<TypeDefinition<?>> typeDefinitions;
37 ImmutableSet<GroupingDefinition> groupings;
38 ImmutableList<UnknownSchemaNode> unknownNodes;
40 RpcDefinitionImpl(final QName qname, final SchemaPath path) {
46 public QName getQName() {
51 public SchemaPath getPath() {
56 public String getDescription() {
61 public String getReference() {
66 public Status getStatus() {
71 public ContainerSchemaNode getInput() {
75 void setInput(final ContainerSchemaNode input) {
80 public ContainerSchemaNode getOutput() {
84 void setOutput(final ContainerSchemaNode output) {
89 public Set<TypeDefinition<?>> getTypeDefinitions() {
90 return typeDefinitions;
94 public Set<GroupingDefinition> getGroupings() {
99 public List<UnknownSchemaNode> getUnknownSchemaNodes() {
104 public int hashCode() {
105 final int prime = 31;
107 result = prime * result + Objects.hashCode(qname);
108 result = prime * result + Objects.hashCode(path);
113 public boolean equals(final Object obj) {
120 if (getClass() != obj.getClass()) {
123 final RpcDefinitionImpl other = (RpcDefinitionImpl) obj;
125 if (other.qname != null) {
128 } else if (!qname.equals(other.qname)) {
132 if (other.path != null) {
135 } else if (!path.equals(other.path)) {
142 public String toString() {
143 return RpcDefinitionImpl.class.getSimpleName() + "[" +