View Javadoc

1   package org.ocltf.concretesyntax.impl;
2   
3   import org.apache.commons.lang.builder.ToStringBuilder;
4   import org.ocltf.concretesyntax.VariableDeclarationCS;
5   import org.ocltf.utils.ExceptionUtils;
6   
7   /***
8    * An implementation of the ocl VariableDeclarationCS facade.
9    * 
10   * @see org.ocltf.concretesyntax.VariableDeclarationCS
11   * 
12   * @author Chad Brandon
13   */
14  public class VariableDeclarationCSImpl implements VariableDeclarationCS {
15  
16  	private String name;
17  	private String type;
18  	private String value;
19  
20  	/***
21  	 * Constructs a new VariableDeclarationCSImpl
22  	 * 
23  	 * @param name the name of the VariableDeclaratiom
24  	 * @param type the type of the VariableDeclarationCS
25  	 */
26  	public VariableDeclarationCSImpl(String name, String type, String value) {
27  		String methodName = "VariableDeclarationCSImpl";
28  		ExceptionUtils.checkNull(methodName, "name", name);
29  		this.name = name;
30  		this.type = type;
31  		this.value = value;
32  	}
33  	
34  	/***
35  	 * @see org.ocltf.concretesyntax.VariableDeclarationCS#getName()
36  	 */
37  	public String getName() {
38  		return this.name;
39  	}
40  	
41  	/***
42  	 * @see org.ocltf.concretesyntax.VariableDeclarationCS#getType()
43  	 */
44  	public String getType() {
45  		return this.type;
46  	}
47  	
48  	/***
49  	 * @see org.ocltf.concretesyntax.VariableDeclarationCS#getValue()
50  	 */
51  	public String getValue() {
52  		return this.value;
53  	}
54  
55      /***
56       * @see java.lang.Object#toString()
57       */
58  	public String toString() { 
59  		return ToStringBuilder.reflectionToString(this);
60  	}
61  
62  }