当前位置: 首页>>代码示例>>Java>>正文


Java XBinaryOperation.isReassignFirstArgument方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:XbaseValidator.java

示例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;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:FeatureLinkingCandidate.java

示例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);
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:15,代码来源:SerializerScopeProvider.java

示例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;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:35,代码来源:XExpressionHelper.java

示例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;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:15,代码来源:XExpressionHelper.java

示例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;
}
 
开发者ID:eclipse,项目名称:xtext-extras,代码行数:8,代码来源:FeatureCallCompiler.java


注:本文中的org.eclipse.xtext.xbase.XBinaryOperation.isReassignFirstArgument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。