public class Expression extends Object
| Constructor and Description |
|---|
Expression(String originalExpression)
Creates a new instance of this Expression object
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendSpaceToTranslatedExpression()
Appends a space character to the current translated expression String Buffer.
|
void |
appendToTranslatedExpression(Object object)
Appends the value of the value of the
object's toString result to the current translated expression
String Buffer. |
String |
getContextElement()
Returns the element which is the context of this expression.
|
String |
getKind()
Returns the Kind of this Expression (inv, post, or pre)
|
String |
getName()
Gets the name of the expression.
|
String |
getOriginalExpression()
Returns the expression before translation.
|
String |
getTranslatedExpression()
Returns the expression after translation.
|
void |
insertInTranslatedExpression(int position,
Object object)
Performs replacement of the value of the
object's toString result at the start and end positions of
the buffer containing the Expression. |
void |
replaceInTranslatedExpression(String pattern,
String replacement)
Replaces the regular expression
pattern with the replacement within the translated expression
buffer. |
void |
setContextElement(String contextElement)
Sets the context element (the element to which the expression applies: the element declared after the
context) |
void |
setKind(String kind)
Sets the "kind" of the expression (i.e, "pre", "post", "inv", etc.)
|
void |
setName(String name)
Sets the name.
|
String |
toString() |
public Expression(String originalExpression)
originalExpression - the expression that will be translated.public void appendToTranslatedExpression(Object object)
object's toString result to the current translated expression
String Buffer.object - the object to append.public void appendSpaceToTranslatedExpression()
public void replaceInTranslatedExpression(String pattern, String replacement)
pattern with the replacement within the translated expression
buffer.pattern - the regular expression pattern to replacereplacement - the replacement string.public void insertInTranslatedExpression(int position, Object object)
object's toString result at the start and end positions of
the buffer containing the Expression.position - the position at which to insertobject - theStringBuffer.insert(int,String)public String getTranslatedExpression()
public String getOriginalExpression()
public String getContextElement()
public String getKind()
public void setContextElement(String contextElement)
context)contextElement - the name of the element which is the context element.public void setKind(String kind)
kind - the kind to set.public String toString()
toString in class ObjectObject.toString()Copyright © 2003–2014 AndroMDA.org. All rights reserved.