本文整理汇总了Java中org.eclipse.xtext.xbase.XBinaryOperation.isReassignFirstArgument方法的典型用法代码示例。如果您正苦于以下问题:Java XBinaryOperation.isReassignFirstArgument方法的具体用法?Java XBinaryOperation.isReassignFirstArgument怎么用?Java XBinaryOperation.isReassignFirstArgument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.xbase.XBinaryOperation
的用法示例。
在下文中一共展示了XBinaryOperation.isReassignFirstArgument方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkAssignment
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
@Check
public void checkAssignment(XBinaryOperation binaryOperation) {
if (binaryOperation.isReassignFirstArgument()) {
XExpression leftOperand = binaryOperation.getLeftOperand();
checkAssignment(leftOperand, false);
}
}
示例2: isReassignFirstArgument
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
protected boolean isReassignFirstArgument(XAbstractFeatureCall featureCall) {
if (featureCall instanceof XBinaryOperation) {
XBinaryOperation binaryOperation = (XBinaryOperation) featureCall;
return binaryOperation.isReassignFirstArgument();
}
return false;
}
示例3: getOperator
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
protected QualifiedName getOperator(XAbstractFeatureCall call, QualifiedName name) {
QualifiedName operator = operatorMapping.getOperator(name);
if (!(call instanceof XBinaryOperation)) {
return operator;
}
XBinaryOperation binaryOperation = (XBinaryOperation) call;
if (!binaryOperation.isReassignFirstArgument()) {
return operator;
}
if (operatorMapping.getCompoundOperators().contains(operator)) {
return operator;
}
return operatorMapping.getCompoundOperator(operator);
}
示例4: hasSideEffects
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
public boolean hasSideEffects(XAbstractFeatureCall featureCall, boolean inspectContents) {
if (featureCall instanceof XBinaryOperation) {
XBinaryOperation binaryOperation = (XBinaryOperation) featureCall;
if (binaryOperation.isReassignFirstArgument()) {
return true;
}
}
if (featureCall instanceof XAssignment) {
return true;
}
if (featureCall.isPackageFragment() || featureCall.isTypeLiteral()) {
return false;
}
final JvmIdentifiableElement feature = featureCall.getFeature();
if (feature == null || feature.eIsProxy())
return true; // linking problems ... could be anything
if (feature instanceof JvmConstructor) { //super() and this()
return true;
}
if (feature instanceof JvmOperation) {
JvmOperation jvmOperation = (JvmOperation) feature;
if (findPureAnnotation(jvmOperation) == null) {
return true;
} else {
if(inspectContents) {
for (XExpression param : featureCall.getActualArguments()) {
if (hasSideEffects(param))
return true;
}
}
}
}
return false;
}
示例5: getMethodNames
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
protected List<QualifiedName> getMethodNames(XAbstractFeatureCall featureCall, QualifiedName operatorSymbol) {
List<QualifiedName> methodNames = new ArrayList<QualifiedName>();
methodNames.add(operatorMapping.getMethodName(operatorSymbol));
if (featureCall instanceof XBinaryOperation) {
XBinaryOperation binaryOperation = (XBinaryOperation) featureCall;
if (binaryOperation.isReassignFirstArgument()) {
QualifiedName simpleOperator = operatorMapping.getSimpleOperator(operatorSymbol);
if (simpleOperator != null) {
methodNames.add(operatorMapping.getMethodName(simpleOperator));
}
}
}
return methodNames;
}
示例6: needMultiAssignment
import org.eclipse.xtext.xbase.XBinaryOperation; //导入方法依赖的package包/类
protected boolean needMultiAssignment(XAbstractFeatureCall expr) {
if (expr instanceof XBinaryOperation) {
XBinaryOperation binaryOperation = (XBinaryOperation) expr;
return binaryOperation.isReassignFirstArgument();
}
return false;
}