summaryrefslogtreecommitdiffstats
path: root/infra/translate-impl/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'infra/translate-impl/src/main')
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericInitReader.java4
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java3
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReaderRegistryBuilder.java5
-rw-r--r--infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/InitSubtreeReader.java7
4 files changed, 10 insertions, 9 deletions
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericInitReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericInitReader.java
index 024e0a815..e55bc8ab6 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericInitReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/GenericInitReader.java
@@ -20,7 +20,7 @@ import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastor
import com.google.common.base.Optional;
import io.fd.honeycomb.translate.read.InitFailedException;
-import io.fd.honeycomb.translate.read.Initializer;
+import io.fd.honeycomb.translate.read.InitReader;
import io.fd.honeycomb.translate.read.ReadContext;
import io.fd.honeycomb.translate.read.ReadFailedException;
import io.fd.honeycomb.translate.spi.read.Initialized;
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
public final class GenericInitReader<O extends DataObject, B extends Builder<O>>
extends GenericReader<O, B>
- implements Initializer<O> {
+ implements InitReader<O, B> {
private static final Logger LOG = LoggerFactory.getLogger(GenericInitReader.class);
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
index ec82b3f7f..2eca8954c 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReader.java
@@ -24,6 +24,7 @@ import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import io.fd.honeycomb.translate.read.InitFailedException;
import io.fd.honeycomb.translate.read.InitListReader;
+import io.fd.honeycomb.translate.read.InitReader;
import io.fd.honeycomb.translate.read.Initializer;
import io.fd.honeycomb.translate.read.ListReader;
import io.fd.honeycomb.translate.read.ReadContext;
@@ -47,7 +48,7 @@ import org.slf4j.LoggerFactory;
class CompositeReader<D extends DataObject, B extends Builder<D>>
extends AbstractGenericReader<D, B>
- implements Initializer<D>, DelegatingReader<D, B> {
+ implements InitReader<D, B>, DelegatingReader<D, B> {
private static final Logger LOG = LoggerFactory.getLogger(CompositeReader.class);
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReaderRegistryBuilder.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReaderRegistryBuilder.java
index 290c5d4aa..36ab90995 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReaderRegistryBuilder.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/CompositeReaderRegistryBuilder.java
@@ -19,6 +19,7 @@ package io.fd.honeycomb.translate.impl.read.registry;
import com.google.common.collect.ImmutableMap;
import io.fd.honeycomb.translate.impl.read.GenericReader;
import io.fd.honeycomb.translate.read.InitReader;
+import io.fd.honeycomb.translate.read.Initializer;
import io.fd.honeycomb.translate.read.Reader;
import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
import io.fd.honeycomb.translate.read.registry.ReaderRegistry;
@@ -46,8 +47,8 @@ public final class CompositeReaderRegistryBuilder
@Override
protected Reader<? extends DataObject, ? extends Builder<?>> getSubtreeHandler(@Nonnull final Set<InstanceIdentifier<?>> handledChildren,
@Nonnull final Reader<? extends DataObject, ? extends Builder<?>> reader) {
- return reader instanceof InitReader
- ? InitSubtreeReader.createForReader(handledChildren, reader)
+ return reader instanceof Initializer
+ ? InitSubtreeReader.createForReader(handledChildren, (InitReader<?, ?>)reader)
: SubtreeReader.createForReader(handledChildren, reader);
}
diff --git a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/InitSubtreeReader.java b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/InitSubtreeReader.java
index 809cdb214..e7cef8107 100644
--- a/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/InitSubtreeReader.java
+++ b/infra/translate-impl/src/main/java/io/fd/honeycomb/translate/impl/read/registry/InitSubtreeReader.java
@@ -21,7 +21,6 @@ import io.fd.honeycomb.translate.read.InitListReader;
import io.fd.honeycomb.translate.read.InitReader;
import io.fd.honeycomb.translate.read.ListReader;
import io.fd.honeycomb.translate.read.ReadContext;
-import io.fd.honeycomb.translate.read.Reader;
import java.util.Set;
import javax.annotation.Nonnull;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
@@ -48,11 +47,11 @@ class InitSubtreeReader<O extends DataObject, B extends Builder<O>>
/**
* Wrap a Reader as an initializing subtree Reader.
*/
- static <D extends DataObject, B extends Builder<D>> Reader<D, B> createForReader(@Nonnull final Set<InstanceIdentifier<?>> handledChildren,
- @Nonnull final Reader<D, B> reader) {
+ static <D extends DataObject, B extends Builder<D>> InitReader<D, B> createForReader(@Nonnull final Set<InstanceIdentifier<?>> handledChildren,
+ @Nonnull final InitReader<D, B> reader) {
return (reader instanceof ListReader)
? new InitSubtreeListReader<>((InitListReader) reader, handledChildren)
- : new InitSubtreeReader<>(((InitReader<D, B>) reader), handledChildren);
+ : new InitSubtreeReader<>(reader, handledChildren);
}
private static class InitSubtreeListReader<D extends DataObject & Identifiable<K>, B extends Builder<D>, K extends Identifier<D>>