2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model;
10 import com.google.common.collect.Lists;
12 import java.util.List;
15 private final String type;
16 private final String name;
17 private final String definition;
18 private final List<String> modifiers;
19 private final boolean needsDepResolver;
21 public Field(String type, String name) {
22 this(Lists.<String> newArrayList(), type, name, null, false);
25 public Field(String type, String name, String definition) {
26 this(Lists.<String> newArrayList(), type, name, definition, false);
29 public Field(List<String> modifiers, String type, String name) {
30 this(modifiers, type, name, null, false);
33 public Field(List<String> modifiers, String type, String name,
35 this(modifiers, type, name, definition, false);
38 public Field(List<String> modifiers, String type, String name,
39 String definition, boolean needsDepResolver) {
40 this.modifiers = modifiers;
43 this.definition = definition;
44 this.needsDepResolver = needsDepResolver;
47 public Field(String type, String name, String definition, boolean needsDepResolver) {
48 this(Lists.<String> newArrayList(), type, name, definition, needsDepResolver);
51 public boolean isNeedsDepResolver() {
52 return needsDepResolver;
55 public String getType() {
59 public List<String> getModifiers() {
63 public String getName() {
67 public String getDefinition() {
71 public boolean isArray() {
72 return type.endsWith("[]");