KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > plugin > descriptor > Parameter


1 package org.apache.maven.plugin.descriptor;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 /**
20  * @author <a HREF="mailto:jason@maven.org">Jason van Zyl</a>
21  * @version $Id: Parameter.java 239397 2005-08-23 12:28:54Z brett $
22  */

23 public class Parameter
24 {
25     private String JavaDoc alias;
26
27     private String JavaDoc name;
28
29     private String JavaDoc type;
30
31     private boolean required;
32
33     private boolean editable = true;
34
35     private String JavaDoc description;
36
37     private String JavaDoc expression;
38
39     private String JavaDoc deprecated;
40
41     private String JavaDoc defaultValue;
42
43     private Requirement requirement;
44
45     // ----------------------------------------------------------------------
46
//
47
// ----------------------------------------------------------------------
48

49     public String JavaDoc getName()
50     {
51         return name;
52     }
53
54     public void setName( String JavaDoc name )
55     {
56         this.name = name;
57     }
58
59     public String JavaDoc getType()
60     {
61         return type;
62     }
63
64     public void setType( String JavaDoc type )
65     {
66         this.type = type;
67     }
68
69     public boolean isRequired()
70     {
71         return required;
72     }
73
74     public void setRequired( boolean required )
75     {
76         this.required = required;
77     }
78
79     public String JavaDoc getDescription()
80     {
81         return description;
82     }
83
84     public void setDescription( String JavaDoc description )
85     {
86         this.description = description;
87     }
88
89     public String JavaDoc getExpression()
90     {
91         return expression;
92     }
93
94     public void setExpression( String JavaDoc expression )
95     {
96         this.expression = expression;
97     }
98
99     public String JavaDoc getDeprecated()
100     {
101         return deprecated;
102     }
103
104     public void setDeprecated( String JavaDoc deprecated )
105     {
106         this.deprecated = deprecated;
107     }
108
109     public int hashCode()
110     {
111         return name.hashCode();
112     }
113
114     public boolean equals( Object JavaDoc other )
115     {
116         return ( other instanceof Parameter ) && getName().equals( ( (Parameter) other ).getName() );
117     }
118
119     public String JavaDoc getAlias()
120     {
121         return alias;
122     }
123
124     public void setAlias( String JavaDoc alias )
125     {
126         this.alias = alias;
127     }
128
129     public boolean isEditable()
130     {
131         return editable;
132     }
133
134     public void setEditable( boolean editable )
135     {
136         this.editable = editable;
137     }
138
139     public void setDefaultValue( String JavaDoc defaultValue )
140     {
141         this.defaultValue = defaultValue;
142     }
143
144     public String JavaDoc getDefaultValue()
145     {
146         return defaultValue;
147     }
148
149     public String JavaDoc toString()
150     {
151         return "Mojo parameter [name: \'" + getName() + "\'; alias: \'" + getAlias() + "\']";
152     }
153
154     public Requirement getRequirement()
155     {
156         return requirement;
157     }
158
159     public void setRequirement( Requirement requirement )
160     {
161         this.requirement = requirement;
162     }
163 }
164
Popular Tags