2 * Copyright (c) 2016 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package io.fd.honeycomb.v3po.translate.read.registry;
19 import com.google.common.annotations.Beta;
20 import io.fd.honeycomb.v3po.translate.ModifiableSubtreeManagerRegistryBuilder;
21 import io.fd.honeycomb.v3po.translate.read.Reader;
22 import javax.annotation.Nonnull;
23 import org.opendaylight.yangtools.concepts.Builder;
24 import org.opendaylight.yangtools.yang.binding.DataObject;
25 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
28 * Mutable registry that allows adding new readers.
31 public interface ModifiableReaderRegistryBuilder
32 extends ModifiableSubtreeManagerRegistryBuilder<Reader<? extends DataObject, ? extends Builder<?>>> {
34 // TODO we should be able to add structural/reflexive readers automatically in the registry builder, we just need builder class
35 // We would need generated class loading strategy instance and then load builder classes relying on naming + package conventions of Binding spec
37 * Add a structural reader that performs no read operation on its own, just fills in the hierarchy.
39 <D extends DataObject> void addStructuralReader(@Nonnull InstanceIdentifier<D> id,
40 @Nonnull Class<? extends Builder<D>> builderType);