/* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.data.impl.schema.builder.impl; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.LeafNode; import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeBuilder; import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; @Deprecated(since = "6.0.7", forRemoval = true) public final class ImmutableLeafNodeSchemaAwareBuilder extends ImmutableLeafNodeBuilder { private ImmutableLeafNodeSchemaAwareBuilder(final LeafSchemaNode schema) { super.withNodeIdentifier(NodeIdentifier.create(schema.getQName())); } public static @NonNull NormalizedNodeBuilder> create( final LeafSchemaNode schema) { return new ImmutableLeafNodeSchemaAwareBuilder<>(schema); } @Override public NormalizedNodeBuilder> withValue(final T withValue) { // TODO: check value type return super.withValue(withValue); } @Override public NormalizedNodeBuilder> withNodeIdentifier( final NodeIdentifier withNodeIdentifier) { throw new UnsupportedOperationException("Node identifier created from schema"); } }