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.eclipse.jdt.annotation.NonNullByDefault;
15 import org.opendaylight.yangtools.yang.binding.contract.StatementNamespace;
16 import org.opendaylight.yangtools.yang.common.AbstractQName;
19 final class CamelCaseNamingStrategy extends YangIdentifierClassNamingStrategy {
20 private final StatementNamespace namespace;
22 CamelCaseNamingStrategy(final StatementNamespace namespace, final AbstractQName nodeIdentifier) {
23 super(nodeIdentifier);
24 this.namespace = requireNonNull(namespace);
27 StatementNamespace namespace() {
32 @NonNull ClassNamingStrategy fallback() {
33 return namespace.resistant() ? new ResistedCamelCaseNamingStrategy(this)
34 : new CamelCaseWithNamespaceNamingStrategy(this);
38 ToStringHelper addToStringAttributes(final ToStringHelper helper) {
39 return super.addToStringAttributes(helper).add("namespace", namespace);