public class ConcreteSyntaxUtils extends Object
| Constructor and Description |
|---|
ConcreteSyntaxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static StringBuffer |
concatContents(List list)
Iterates through the passed in list and concatenates all the values of objects toString value to a StringBuffer and
returns the StringBuffer.
|
static List |
getArgumentNames(VariableDeclaration[] variableDeclarations)
Loads a List of variable declaration names from the
variableDeclarations |
static String |
getArrowFeatureCallResultNavigationalPath(APropertyCallExpression expression)
Gets the navigational path from the given
expression that occurs after an arrow feature call. |
static List |
getFeatureCalls(APropertyCallExpression expression)
Gets all feature calls from the passed in APropertyCallExpression instance.
|
static String[] |
getLeftAndRightExpressions(PRelationalExpression relationalExpression)
Gets the left and right expressions of a PRelationalExpression and puts then into a List.
|
static OperationDeclaration |
getOperationDeclaration(POperation operation)
Converts the passed
operation to an instance of Operation for the passed in operation. |
static List |
getParameters(AFeatureCall featureCall)
Gets all the parameters from the
featureCall instance. |
static String |
getParametersAsString(AFeatureCall featureCall)
Gets all the parameters from the
featureCall instance as a comma separated String. |
static String |
getParametersAsString(PFeatureCallParameters featureCallParameters)
Gets all the parameters from the
PFeatureCallParameters instance as a comma separated String. |
static String |
getPrimaryExpression(APropertyCallExpression expression)
Gets the "real" primary expression, as opposed to the primary expression retrieved from the parser syntax (since
it leaves off any navigational relationships).
|
static String |
getType(TName name,
List pathNameTail)
Concatenates the type from the passed in name and pathNameTail.
|
static VariableDeclaration[] |
getVariableDeclarations(AStandardDeclarator standardDeclarator)
Retrieves all the variable declarations for the passed in
standardDeclarator. |
static VariableDeclaration[] |
getVariableDeclarations(POperation operation)
Retrieves all the variable declarations for the passed in
operation. |
static VariableDeclaration[] |
getVariableDeclarations(PVariableDeclarationList variableDeclarationList)
Creates an array of VariableDeclaration[] from the passed in PVariableDeclarationList.
|
protected static VariableDeclaration |
newVariableDeclaration(PVariableDeclaration variableDeclaration,
PEqualExpression initialValue)
Creates a new VariableDeclaration from the passed in PVariableDeclaration.
|
public ConcreteSyntaxUtils()
public static StringBuffer concatContents(List list)
list - the List of objects to concatenate.public static OperationDeclaration getOperationDeclaration(POperation operation)
operation to an instance of Operation for the passed in operation.operation - public static VariableDeclaration[] getVariableDeclarations(POperation operation)
operation.operation - the operation for which to retrieve the variable declarations.public static VariableDeclaration[] getVariableDeclarations(AStandardDeclarator standardDeclarator)
standardDeclarator.standardDeclarator - the standard declartor for which to retrieve the VariableDeclaration instances.protected static VariableDeclaration newVariableDeclaration(PVariableDeclaration variableDeclaration, PEqualExpression initialValue)
variableDeclaration - the PVariableDeclaration that the new VariableDeclaration will be created from.initialValue - the initial value of the variable declaration.public static VariableDeclaration[] getVariableDeclarations(PVariableDeclarationList variableDeclarationList)
variableDeclarationList - the PVariableDeclarationList that the new VariableDeclaration will be created
from.public static List getParameters(AFeatureCall featureCall)
featureCall instance.featureCall - the featureCall for which to retrieve the parameterspublic static String getParametersAsString(AFeatureCall featureCall)
featureCall instance as a comma separated String.featureCall - the featureCall from which to retrieve the parameterspublic static String getParametersAsString(PFeatureCallParameters featureCallParameters)
PFeatureCallParameters instance as a comma separated String.featureCallParameters - the featureCallParameters from which to retrieve the parameterspublic static String[] getLeftAndRightExpressions(PRelationalExpression relationalExpression)
relationalExpression - public static String getType(TName name, List pathNameTail)
name - the starting name of the typepathNameTail - the tail pieces of the namepublic static String getPrimaryExpression(APropertyCallExpression expression)
expression - the APosfixExpression instance for which to retrieve the primary expressionpublic static List getFeatureCalls(APropertyCallExpression expression)
expression - the APosfixExpression instance for which to retrieve the primary expressionpublic static String getArrowFeatureCallResultNavigationalPath(APropertyCallExpression expression)
expression that occurs after an arrow feature call. If the
the expression contains an arrow feature call, then the navigational expression is any expression navigating on
the result of an arrow feature call (otherwise it's an empty string).expression - the expression from which to retrieve the navigational path.public static List getArgumentNames(VariableDeclaration[] variableDeclarations)
variableDeclarationsvariableDeclarations - an array of VariableDeclaration objectsCopyright © 2003–2014 AndroMDA.org. All rights reserved.