org.eclipse.xtext.xbase.util
Class XExpressionHelper

java.lang.Object
  extended by org.eclipse.xtext.xbase.util.XExpressionHelper
Direct Known Subclasses:
XtendExpressionHelper

public class XExpressionHelper
extends java.lang.Object

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
XExpressionHelper()
           
 
Method Summary
protected  JvmAnnotationReference findAnnotation(JvmAnnotationTarget feature, java.lang.String annotationType)
           
 JvmAnnotationReference findInlineAnnotation(XAbstractFeatureCall featureCall)
           
 JvmAnnotationReference findPureAnnotation(JvmExecutable featureCall)
           
 java.lang.String getAndOperator()
           
 java.lang.String getOrOperator()
           
 boolean hasSideEffects(XExpression expr)
           
 boolean isFieldOrVariableReference(XExpression expr)
           
 boolean isInlined(XAbstractFeatureCall call)
           
 boolean isLiteral(XExpression expr)
           
 boolean isShortCircuiteBooleanOperation(XAbstractFeatureCall featureCall)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XExpressionHelper

public XExpressionHelper()
Method Detail

isLiteral

public boolean isLiteral(XExpression expr)

isFieldOrVariableReference

public boolean isFieldOrVariableReference(XExpression expr)

hasSideEffects

public boolean hasSideEffects(XExpression expr)
Returns:
whether the expression itself (not its children) possibly causes a side-effect

findInlineAnnotation

public JvmAnnotationReference findInlineAnnotation(XAbstractFeatureCall featureCall)

findPureAnnotation

public JvmAnnotationReference findPureAnnotation(JvmExecutable featureCall)

findAnnotation

protected JvmAnnotationReference findAnnotation(JvmAnnotationTarget feature,
                                                java.lang.String annotationType)

getAndOperator

public java.lang.String getAndOperator()

getOrOperator

public java.lang.String getOrOperator()

isShortCircuiteBooleanOperation

public boolean isShortCircuiteBooleanOperation(XAbstractFeatureCall featureCall)

isInlined

public boolean isInlined(XAbstractFeatureCall call)