Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1974 jgill 1
/**
2
 * AntShield - A project release tool for ant.
3
 */
4
package com.erggroup.mass.ant;
5
 
6
import org.apache.tools.ant.BuildException;
7
 
8
/**
9
 * Implements the AntShield task's nested field tag's nested option tag.
10
 */
11
public class OptionElement
12
{
13
    private FieldElement parent = null;
14
    private String value = null;
15
 
16
    /**
17
     * Constructor.
18
     * @param f
19
     */
20
    public OptionElement(FieldElement f)
21
    {
22
        parent = f;
23
    }
24
 
25
    /**
26
     * Set the value property.
27
     * @param s
28
     */
29
    public void setValue(String s)
30
    {
31
        value = s;
32
    }
33
 
34
    /**
35
     * Returns this option's value.
36
     * @return
37
     */
38
    public String getValue()
39
    {
40
        return value;
41
    }
42
 
43
    /**
44
     * Check this options's parameters.
45
     */
46
    public void check()
47
    {
48
        if ((value == null) || (value.length() == 0))
49
        {
50
            throw new BuildException("<" + parent.getTaskName() + "> Invalid option specification for field [" + parent.getName() + "]");
51
        }
52
    }
53
}