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.mdsal.binding.generator.impl.reactor;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.base.MoreObjects.ToStringHelper;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.mdsal.binding.spec.naming.BindingMapping;
15 import org.opendaylight.yangtools.yang.common.AbstractQName;
17 final class ModuleNamingStrategy extends ClassNamingStrategy {
18 private final @NonNull AbstractQName name;
20 ModuleNamingStrategy(final AbstractQName name) {
21 this.name = requireNonNull(name);
25 AbstractQName nodeIdentifier() {
30 String simpleClassName() {
31 return BindingMapping.getClassName(name.getLocalName());
35 ClassNamingStrategy fallback() {
40 ToStringHelper addToStringAttributes(final ToStringHelper helper) {
41 return helper.add("localName", name.getLocalName());