*/
package org.opendaylight.yangtools.yang.data.codec.gson;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
/**
* A recursion level of {@link JSONNormalizedNodeStreamWriter}, which represents
* as when it is in a containing list.
*/
class JSONStreamWriterObjectContext extends JSONStreamWriterQNameContext {
- protected JSONStreamWriterObjectContext(final JSONStreamWriterContext parent, final PathArgument arg, final boolean mandatory) {
- super(Preconditions.checkNotNull(parent), arg.getNodeType(), mandatory);
+ protected JSONStreamWriterObjectContext(final JSONStreamWriterContext parent, final PathArgument arg,
+ final boolean mandatory) {
+ super(requireNonNull(parent), arg.getNodeType(), mandatory);
}
@Override
- protected void emitStart(final SchemaContext schema, final JsonWriter writer) throws IOException {
+ protected void emitStart(final EffectiveModelContext schema, final JsonWriter writer) throws IOException {
writer.beginObject();
}
protected void emitEnd(final JsonWriter writer) throws IOException {
writer.endObject();
}
-}
\ No newline at end of file
+}