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 org.opendaylight.mdsal.binding.generator.impl.rt.DefaultLeafRuntimeType;
11 import org.opendaylight.mdsal.binding.model.api.Type;
12 import org.opendaylight.mdsal.binding.runtime.api.LeafRuntimeType;
13 import org.opendaylight.yangtools.yang.model.api.stmt.LeafEffectiveStatement;
16 * Generator corresponding to a {@code leaf} statement.
18 final class LeafGenerator extends AbstractTypeAwareGenerator<LeafEffectiveStatement, LeafRuntimeType, LeafGenerator> {
19 LeafGenerator(final LeafEffectiveStatement statement, final AbstractCompositeGenerator<?, ?> parent) {
20 super(statement, parent);
24 LeafRuntimeType createExternalRuntimeType(final Type type) {
25 return new DefaultLeafRuntimeType(type, statement());
29 LeafRuntimeType createInternalRuntimeType(final AugmentResolver resolver, final LeafEffectiveStatement statement,
31 return new DefaultLeafRuntimeType(type, statement);