Naming here is off: the class and schema do not correspond to each
other, but they are not in parent/child relationship, either.
Change-Id: I3f48ce0beaa446fcf4829fb3faaf24d075516ba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
- public ImmutableMap<Method, ValueNodeCodecContext> getLeafNodes(final Class<?> parentClass,
- final DataNodeContainer childSchema) {
+ public ImmutableMap<Method, ValueNodeCodecContext> getLeafNodes(final Class<?> type,
+ final DataNodeContainer schema) {
final Map<String, DataSchemaNode> getterToLeafSchema = new HashMap<>();
final Map<String, DataSchemaNode> getterToLeafSchema = new HashMap<>();
- for (final DataSchemaNode leaf : childSchema.getChildNodes()) {
+ for (final DataSchemaNode leaf : schema.getChildNodes()) {
if (leaf instanceof TypedDataSchemaNode || leaf instanceof AnyxmlSchemaNode
|| leaf instanceof AnydataSchemaNode) {
getterToLeafSchema.put(BindingSchemaMapping.getGetterMethodName(leaf), leaf);
}
}
if (leaf instanceof TypedDataSchemaNode || leaf instanceof AnyxmlSchemaNode
|| leaf instanceof AnydataSchemaNode) {
getterToLeafSchema.put(BindingSchemaMapping.getGetterMethodName(leaf), leaf);
}
}
- return getLeafNodesUsingReflection(parentClass, getterToLeafSchema);
+ return getLeafNodesUsingReflection(type, getterToLeafSchema);
}
private ImmutableMap<Method, ValueNodeCodecContext> getLeafNodesUsingReflection(
}
private ImmutableMap<Method, ValueNodeCodecContext> getLeafNodesUsingReflection(