* Special case only use by GET restconf/operations (since moment of old Yang
* parser and old yang model API removal) to build and use fake leaf like child
* in container
- *
*/
-class LeafSchemaNodeImpl implements LeafSchemaNode {
+final class FakeLeafSchemaNode implements LeafSchemaNode {
private final SchemaPath path;
- private final QName qname;
/**
* Base values for fake leaf schema node
*
- * @param basePath
- * - schema path
* @param qname
* - qname
*/
- LeafSchemaNodeImpl(final SchemaPath basePath, final QName qname) {
- this.path = basePath.createChild(qname);
- this.qname = qname;
+ FakeLeafSchemaNode(final QName qname) {
+ this.path = FakeContainerSchemaNode.PATH.createChild(qname);
}
@Override
@Override
public QName getQName() {
- return this.qname;
+ return path.getLastComponent();
}
@Override
public SchemaPath getPath() {
- return this.path;
+ return path;
}
@Override