Class ParenthesisExpression
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.expressions.Expression
-
- net.ssehub.easy.instantiation.core.model.expressions.ParenthesisExpression
-
public class ParenthesisExpression extends Expression
Represents a parenthesis expression.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private Expressionexpr
-
Constructor Summary
Constructors Constructor Description ParenthesisExpression()Constructor for serialization.ParenthesisExpression(Expression expr)Creates a new parenthesis expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IExpressionVisitor visitor)Visits the expression.ExpressiongetExpr()Returns the expression within the parenthesis.TypeDescriptor<?>inferType()Infers the type of this expression including the type of the contained sub-expressions.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.expressions.Expression
replaceEmptyLine
-
-
-
-
Field Detail
-
expr
private Expression expr
-
-
Constructor Detail
-
ParenthesisExpression
ParenthesisExpression()
Constructor for serialization.
-
ParenthesisExpression
public ParenthesisExpression(Expression expr)
Creates a new parenthesis expression.- Parameters:
expr- the expression within the parenthesis
-
-
Method Detail
-
getExpr
public Expression getExpr()
Returns the expression within the parenthesis.- Returns:
- the expression
-
inferType
public TypeDescriptor<?> inferType() throws VilException
Description copied from class:ExpressionInfers the type of this expression including the type of the contained sub-expressions.- Specified by:
inferTypein classExpression- Returns:
- the type of this expression
- Throws:
VilException- in case that inferring the type fails
-
accept
public java.lang.Object accept(IExpressionVisitor visitor) throws VilException
Description copied from class:ExpressionVisits the expression.- Specified by:
acceptin classExpression- Parameters:
visitor- the visitor- Returns:
- the result of visiting this expression (may be null)
- Throws:
VilException- in case that visiting fails (e.g., execution)
-
-