org.eclipse.xtext.xbase.XMemberFeatureCall.isExplicitOperationCallOrBuilderSyntax()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.eclipse.xtext.xbase.XMemberFeatureCall.isExplicitOperationCallOrBuilderSyntax()方法的一些代码示例,展示了XMemberFeatureCall.isExplicitOperationCallOrBuilderSyntax()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMemberFeatureCall.isExplicitOperationCallOrBuilderSyntax()方法的具体详情如下:
包路径:org.eclipse.xtext.xbase.XMemberFeatureCall
类名称:XMemberFeatureCall
方法名:isExplicitOperationCallOrBuilderSyntax

XMemberFeatureCall.isExplicitOperationCallOrBuilderSyntax介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

@Check
public void checkExplicitOperationCall(XMemberFeatureCall featureCall) {
  if (featureCall.getFeature() instanceof JvmOperation 
      && !featureCall.isExplicitOperationCallOrBuilderSyntax()
      && featureCall.getFeature().getSimpleName().equals(featureCall.getConcreteSyntaxFeatureName())) {
    addIssue("Method call without parentheses", featureCall, XbasePackage.Literals.XABSTRACT_FEATURE_CALL__FEATURE, OPERATION_WITHOUT_PARENTHESES);
  }
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

protected boolean isPotentialTypeLiteralImpl(XExpression featureCall, /* @Nullable */ IResolvedTypes resolvedTypes, boolean staticNotation) {
  if (featureCall instanceof XMemberFeatureCall) {
    XMemberFeatureCall casted = (XMemberFeatureCall) featureCall;
    if (casted.isExplicitOperationCallOrBuilderSyntax() || casted.isNullSafe()) {
      return false;
    }
    XExpression target = casted.getMemberCallTarget();
    if (casted.isExplicitStatic() != staticNotation) {
      return false;
    }
    return isPotentialTypeLiteralImpl(target, resolvedTypes, staticNotation);
  }
  if (featureCall instanceof XFeatureCall) {
    XFeatureCall casted = (XFeatureCall) featureCall;
    if (casted.isExplicitOperationCallOrBuilderSyntax()) {
      return false;
    }
    if (resolvedTypes == null)
      return true;
    LightweightTypeReference knownType = resolvedTypes.getActualType(casted);
    if (knownType == null || knownType.isUnknown()) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.eclipse.xtext/org.eclipse.xtext.xbase

if (featureCall.isExplicitOperationCallOrBuilderSyntax()) {
  if (featureCall.isExplicitOperationCall())
    acceptor.accept(memberFeatureCallElements.getExplicitOperationCallLeftParenthesisKeyword_1_1_3_0_0());

代码示例来源:origin: org.eclipse.xtend/org.eclipse.xtend.core

if ((((((XMemberFeatureCall)expression).getFeature() != null) && ((XMemberFeatureCall)expression).getFeature().eIsProxy()) && (!((XMemberFeatureCall)expression).isExplicitOperationCallOrBuilderSyntax()))) {
 _matched=true;
 final XExpression receiver = ((XMemberFeatureCall)expression).getActualReceiver();

相关文章