Fixed deserialization of IdentityRefs in Restconf URI.
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / Field.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.plugin.ftl.model;
9
10 import java.util.List;
11
12 import com.google.common.collect.Lists;
13
14 public class Field {
15     private final String type;
16     private final String name;
17     private final String definition;
18     private final List<String> modifiers;
19
20     public Field(String type, String name) {
21         this(Lists.<String> newArrayList(), type, name, null);
22     }
23
24     public Field(List<String> modifiers, String type, String name) {
25         this(modifiers, type, name, null);
26     }
27
28     public Field(List<String> modifiers, String type, String name,
29             String definition) {
30         this.modifiers = modifiers;
31         this.type = type;
32         this.name = name;
33         this.definition = definition;
34     }
35
36     public String getType() {
37         return type;
38     }
39
40     public List<String> getModifiers() {
41         return modifiers;
42     }
43
44     public String getName() {
45         return name;
46     }
47
48     public String getDefinition() {
49         return definition;
50     }
51
52     public boolean isArray() {
53         return type.endsWith("[]");
54     }
55 }