X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2FRuntimeBeanEntry.java;h=f19a46d0f461e35a1ecf9dd97e05aa1500a821df;hb=237237663265bfda9069c66151371ce7697aed59;hp=9b82f123caf97f88a40b813d507c29ab2a06ee00;hpb=4f623c74a703a31e787387b536981dcb344ca4f9;p=controller.git diff --git a/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java b/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java index 9b82f123ca..f19a46d0f4 100644 --- a/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java +++ b/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java @@ -67,7 +67,7 @@ public class RuntimeBeanEntry { private final Set rpcs; @VisibleForTesting - public RuntimeBeanEntry(String packageName, + RuntimeBeanEntry(String packageName, DataSchemaNode nodeForReporting, String yangName, String javaNamePrefix, boolean isRoot, Optional keyYangName, List attributes, @@ -228,7 +228,7 @@ public class RuntimeBeanEntry { ContainerSchemaNode container = (ContainerSchemaNode) child; // this can be either TO or hierarchical RB TOAttribute toAttribute = TOAttribute.create(container, - typeProviderWrapper); + typeProviderWrapper, packageName); attributes.add(toAttribute); } else if (child instanceof ListSchemaNode) { if (isInnerStateBean(child)) { @@ -239,7 +239,7 @@ public class RuntimeBeanEntry { runtimeBeanEntries.add(hierarchicalChild); } else /* ordinary list attribute */{ ListAttribute listAttribute = ListAttribute.create( - (ListSchemaNode) child, typeProviderWrapper); + (ListSchemaNode) child, typeProviderWrapper, packageName); attributes.add(listAttribute); } @@ -280,7 +280,7 @@ public class RuntimeBeanEntry { } else if (rpcDefinition.getOutput().getChildNodes().size() == 1) { DataSchemaNode returnDSN = rpcDefinition.getOutput() .getChildNodes().iterator().next(); - returnType = getReturnTypeAttribute(returnDSN, typeProviderWrapper); + returnType = getReturnTypeAttribute(returnDSN, typeProviderWrapper, packageName); } else { throw new IllegalArgumentException( @@ -311,16 +311,17 @@ public class RuntimeBeanEntry { attributes, rpcs); } - private static AttributeIfc getReturnTypeAttribute(DataSchemaNode child, TypeProviderWrapper typeProviderWrapper) { + private static AttributeIfc getReturnTypeAttribute(DataSchemaNode child, TypeProviderWrapper typeProviderWrapper, + String packageName) { if (child instanceof LeafSchemaNode) { LeafSchemaNode leaf = (LeafSchemaNode) child; return new JavaAttribute(leaf, typeProviderWrapper); } else if (child instanceof ContainerSchemaNode) { ContainerSchemaNode container = (ContainerSchemaNode) child; - TOAttribute toAttribute = TOAttribute.create(container, typeProviderWrapper); + TOAttribute toAttribute = TOAttribute.create(container, typeProviderWrapper, packageName); return toAttribute; } else if (child instanceof ListSchemaNode) { - return ListAttribute.create((ListSchemaNode) child, typeProviderWrapper); + return ListAttribute.create((ListSchemaNode) child, typeProviderWrapper, packageName); } else if (child instanceof LeafListSchemaNode) { return ListAttribute.create((LeafListSchemaNode) child, typeProviderWrapper); } else {