Merge "Fixed add/delete/modify RPC for group/flow/remove reach the test provider"
[controller.git] / opendaylight / config / yang-jmx-generator / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / attribute / ListDependenciesAttribute.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
9
10 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
11 import org.opendaylight.yangtools.binding.generator.util.Types;
12 import org.opendaylight.yangtools.sal.binding.model.api.Type;
13 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
14
15 import javax.management.ObjectName;
16 import javax.management.openmbean.ArrayType;
17 import javax.management.openmbean.OpenType;
18 import javax.management.openmbean.SimpleType;
19 import java.util.List;
20
21 public class ListDependenciesAttribute extends AbstractDependencyAttribute {
22
23     public ListDependenciesAttribute(DataSchemaNode attrNode, ServiceInterfaceEntry sie, boolean mandatory, String nullableDescription) {
24         super(attrNode, sie, mandatory, nullableDescription);
25     }
26
27     @Override
28     public Type getType() {
29         return Types.parameterizedTypeFor(Types.typeForClass(List.class), Types.typeForClass(ObjectName.class));
30     }
31
32     @Override
33     public ArrayType<?> getOpenType() {
34         OpenType<?> innerOpenType = SimpleType.OBJECTNAME;
35         return ListAttribute.constructArrayType(innerOpenType);
36     }
37
38 }