KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sablecc > sablecc > launcher > TextArgument


1 /* This file is part of SableCC ( http://sablecc.org ).
2  *
3  * Copyright 2007 Etienne M. Gagnon <egagnon@j-meg.com>
4  * Copyright 2007 Raymond Audet <raymond.audet@gmail.com>
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 package org.sablecc.sablecc.launcher;
20
21 import org.sablecc.sablecc.exception.InternalException;
22
23 /**
24  * A text argument puts in appendix a String at the end of another.
25  */

26 public class TextArgument {
27
28     /** the text to append. */
29     private String JavaDoc text;
30
31     /**
32      * Constructs a new textArgument.
33      *
34      * @param text
35      * the provided text to append.
36      *
37      * @throws InternalException
38      * if the text is <code>null</code>.
39      */

40     public TextArgument(
41             String JavaDoc text) {
42
43         if (text == null) {
44             throw new InternalException("text may not be null");
45         }
46
47         this.text = text;
48     }
49
50     /**
51      * Returns the text of this textArgument.
52      *
53      * @return the text.
54      */

55     public String JavaDoc getText() {
56
57         return this.text;
58     }
59 }
60
Popular Tags