All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.java.metamodel.OJSimpleStatement Maven / Gradle / Ivy

There is a newer version: 2.0.15
Show newest version
package org.umlg.java.metamodel;

import java.util.Set;

import org.umlg.java.metamodel.generated.OJSimpleStatementGEN;


public class OJSimpleStatement extends OJSimpleStatementGEN {

/*********************************************************************
 * The constructor
 ********************************************************************/
	public OJSimpleStatement() {
		super();
	}
	public OJSimpleStatement(String expression) {
		super();
		this.setExpression(expression);
	}

/*********************************************************************
 * The operations from the model
 ********************************************************************/
	public OJSimpleStatement getCopy() {
		OJSimpleStatement result = new OJSimpleStatement();
		result.setExpression(this.getExpression());
		return result;
	}
	public String toJavaString() {
		String result = "";
		if (getExpression().length() != 0 ) result = getExpression();
//		if (result.length() > 0 && !(result.charAt(result.length()-1) == '}')) {
		if (result.length() > 0) {
			result = result + ";";
		}
		return result; 	
	}
	
	public OJSimpleStatement getDeepCopy() {
		OJSimpleStatement copy = new OJSimpleStatement();
		copyDeepInfoInto(copy);
		return copy;
	}
	
	public void copyDeepInfoInto(OJSimpleStatement copy) {
		super.copyDeepInfoInto(copy);
		copy.setExpression(this.getExpression());
	}	
	
	public void renameAll(Set renamePathNames, String newName) {
		setExpression(replaceAll(getExpression(), renamePathNames, newName));
	}	
/*********************************************************************
 * The getters and setters
 ********************************************************************/

/*********************************************************************
 * Some utility operations
 ********************************************************************/

/*********************************************************************
 * Extra operations that implement the OCL expressions used
 ********************************************************************/

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy