import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-
import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
final Map<QName, Set<RpcDefinition>> identitiesToRpcs) {
List<AttributeIfc> attributes = Lists.newArrayList();
- // List<JavaAttribute> javaAttributes = new ArrayList<>();
- // List<TOAttribute> toAttributes = new ArrayList<>();
List<RuntimeBeanEntry> runtimeBeanEntries = new ArrayList<>();
for (DataSchemaNode child : subtree.getChildNodes()) {
// child leaves can be java attributes, TO attributes, or child
.findJavaParameter(rpcDefinition);
AttributeIfc returnType;
if (rpcDefinition.getOutput() == null
- || rpcDefinition.getOutput().getChildNodes().size() == 0) {
+ || rpcDefinition.getOutput().getChildNodes().isEmpty()) {
returnType = VoidAttribute.getInstance();
} else if (rpcDefinition.getOutput().getChildNodes().size() == 1) {
DataSchemaNode returnDSN = rpcDefinition.getOutput()
}
}
- private static Collection<DataSchemaNode> sortAttributes(final Set<DataSchemaNode> childNodes) {
+ private static Collection<DataSchemaNode> sortAttributes(final Collection<DataSchemaNode> childNodes) {
final TreeSet<DataSchemaNode> dataSchemaNodes = new TreeSet<>(new Comparator<DataSchemaNode>() {
@Override
public int compare(final DataSchemaNode o1, final DataSchemaNode o2) {
currentModule, identitiesToRpcs);
Optional<String> keyYangName;
- if (listSchemaNode.getKeyDefinition().size() == 0) {
+ if (listSchemaNode.getKeyDefinition().isEmpty()) {
keyYangName = Optional.absent();
} else if (listSchemaNode.getKeyDefinition().size() == 1) {
// key must be either null or one of supported key types