001 /*
002 * JBoss, Home of Professional Open Source.
003 * Copyright 2008, Red Hat Middleware LLC, and individual contributors
004 * as indicated by the @author tags. See the copyright.txt file in the
005 * distribution for a full listing of individual contributors.
006 *
007 * This is free software; you can redistribute it and/or modify it
008 * under the terms of the GNU Lesser General Public License as
009 * published by the Free Software Foundation; either version 2.1 of
010 * the License, or (at your option) any later version.
011 *
012 * This software is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this software; if not, write to the Free
019 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021 */
022 package org.jboss.dna.sequencer.java.metadata;
023
024 import java.util.ArrayList;
025 import java.util.List;
026
027 /**
028 * FieldMetadata is the base class of all fields.
029 *
030 * @author Serge Pagop
031 */
032 public class FieldMetadata {
033
034 /** The type of the field */
035 private String type;
036
037 /** The variables */
038 private List<Variable> variables = new ArrayList<Variable>();
039
040 private List<ModifierMetadata> modifierMetadatas = new ArrayList<ModifierMetadata>();
041
042 /**
043 * @return variables
044 */
045 public List<Variable> getVariables() {
046 return variables;
047 }
048
049 /**
050 * @param variables Sets variables to the specified value.
051 */
052 public void setVariables( List<Variable> variables ) {
053 this.variables = variables;
054 }
055
056 /**
057 * @return type
058 */
059 public String getType() {
060 return type;
061 }
062
063 /**
064 * @param type Sets type to the specified value.
065 */
066 public void setType( String type ) {
067 this.type = type;
068 }
069
070 /**
071 * @return modifierMetadatas
072 */
073 public List<ModifierMetadata> getModifiers() {
074 return modifierMetadatas;
075 }
076
077 /**
078 * @param modifierMetadatas Sets modifierMetadatas to the specified value.
079 */
080 public void setModifiers( List<ModifierMetadata> modifierMetadatas ) {
081 this.modifierMetadatas = modifierMetadatas;
082 }
083
084 /**
085 * Find out if a field is primitive type or not.
086 *
087 * @return true if field is a primitive type.
088 */
089 public boolean isPrimitiveType() {
090 return false;
091 }
092
093 /**
094 * Find out if a field is a simple type or not.
095 *
096 * @return true if field is a simple type.
097 */
098 public boolean isSimpleType() {
099 return false;
100 }
101
102 /**
103 * Find out if a field is a array type or not.
104 *
105 * @return true if field is a array type.
106 */
107 public boolean isArrayType() {
108 return false;
109 }
110
111 /**
112 * Find out if a field is a qualified type or not.
113 *
114 * @return true if field is a qualified type.
115 */
116 public boolean isQualifiedType() {
117 return false;
118 }
119
120 /**
121 * Find out if a field is a parameterized type or not.
122 *
123 * @return true if field is a parameterized type.
124 */
125 public boolean isParameterizedType() {
126 return false;
127 }
128
129 /**
130 * Find out if a field is a wild card type or not.
131 *
132 * @return true if field is a wild card type.
133 */
134 public boolean isWildcardType() {
135 return false;
136 }
137 }