use of org.opendaylight.yangtools.yang.data.api.schema.builder.NormalizedNodeBuilder in project yangtools by opendaylight.
the class ImmutableNormalizedNodeStreamWriter method currentScalar.
@SuppressWarnings("rawtypes")
private NormalizedNodeBuilder currentScalar() {
final NormalizedNodeBuilder current = current();
checkState(!(current instanceof NormalizedNodeContainerBuilder), "Unexpected node container %s", current);
return current;
}
use of org.opendaylight.yangtools.yang.data.api.schema.builder.NormalizedNodeBuilder in project yangtools by opendaylight.
the class ImmutableNormalizedNodeStreamWriter method endNode.
@Override
@SuppressWarnings("rawtypes")
public void endNode() {
final NormalizedNodeBuilder finishedBuilder = builders.poll();
checkState(finishedBuilder != null, "Node which should be closed does not exists.");
final NormalizedNode product = finishedBuilder.build();
nextSchema = null;
writeChild(product);
}
use of org.opendaylight.yangtools.yang.data.api.schema.builder.NormalizedNodeBuilder in project yangtools by opendaylight.
the class ImmutableNormalizedNodeStreamWriter method currentContainer.
@SuppressWarnings("rawtypes")
private NormalizedNodeContainerBuilder currentContainer() {
final NormalizedNodeBuilder current = current();
if (current == null) {
return null;
}
checkState(current instanceof NormalizedNodeContainerBuilder, "%s is not a node container", current);
return (NormalizedNodeContainerBuilder) current;
}
Aggregations