Code Search for Developers
 
 
  

JavaProperty.java from MASE: Agile Software Engineering at Krugle


Show JavaProperty.java syntax highlighted

package ca.ucalgary.cpsc.ebe.fitClipse.FixtureGenerater;

public class JavaProperty extends JavaClassChild {

	private String type = "String";
	private String value = null;
	
	public JavaProperty(String name){
		this.name = name;
	}
	
	public JavaProperty(String name, String access){
		
		this.name = name;
		this.access = access;
	}
	
	public JavaProperty(String name, String access, String value){
		this.name = name;
		this.access = access;
		this.value = value;
	}
	
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public void setType(String type){
		this.type = type;
	}
	public String getType(){
		return this.type;
	}
	public String getIdentifier(){
		return this.name;
	}

	private String renderValue(){
		if(JavaSourceUtil.TYPE_CHAR.equals(this.type)){
			return "'" + value + "'";
		}
		if(JavaSourceUtil.TYPE_STRING.equals(this.type)){
			return "\"" +  value + "\"";
		}
		
		return value;
		
	}
	public String render() {
		StringBuffer propertySource = new StringBuffer();
		propertySource.append(this.access).append(this.renderStaticAbstractIndicators()).append(" ").append(this.type);
		propertySource.append(" ").append(this.name);
		if(this.value != null){
			propertySource.append(" = ").append(this.renderValue());
		}
		
		propertySource.append(";\n");
		return propertySource.toString();
	}
}



See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  ActionFixtureSource.java
  FixtureSource.java
  FixtureSourceFactory.java
  JavaClass.java
  JavaClassChild.java
  JavaFile.java
  JavaMethod.java
  JavaMethodContent.java
  JavaMethodContentNode.java
  JavaMethodParameter.java
  JavaProperty.java
  JavaSourceUtil.java