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


Java ReferenceMode.NEW属性代码示例

本文整理汇总了Java中com.sun.source.tree.MemberReferenceTree.ReferenceMode.NEW属性的典型用法代码示例。如果您正苦于以下问题:Java ReferenceMode.NEW属性的具体用法?Java ReferenceMode.NEW怎么用?Java ReferenceMode.NEW使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.sun.source.tree.MemberReferenceTree.ReferenceMode的用法示例。


在下文中一共展示了ReferenceMode.NEW属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: memberReferenceSuffix

JCExpression memberReferenceSuffix(int pos1, JCExpression t) {
    checkMethodReferences();
    mode = EXPR;
    List<JCExpression> typeArgs = null;
    if (token.kind == LT) {
        typeArgs = typeArguments(false);
    }
    Name refName;
    ReferenceMode refMode;
    if (token.kind == NEW) {
        refMode = ReferenceMode.NEW;
        refName = names.init;
        nextToken();
    } else {
        refMode = ReferenceMode.INVOKE;
        refName = ident();
    }
    return toP(F.at(t.getStartPosition()).Reference(refMode, refName, t, typeArgs));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:JavacParser.java

示例2: needsConversionToLambda

/**
 * Does this reference need to be converted to a lambda
 * (i.e. var args need to be expanded or "super" is used)
 */
final boolean needsConversionToLambda() {
    return interfaceParameterIsIntersectionType() ||
            isSuper ||
            needsVarArgsConversion() ||
            isArrayOp() ||
            isPrivateInOtherClass() ||
            !receiverAccessible() ||
            (tree.getMode() == ReferenceMode.NEW &&
              tree.kind != ReferenceKind.ARRAY_CTOR &&
              (tree.sym.owner.isLocal() || tree.sym.owner.isInner()));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:LambdaToMethod.java

示例3: needsConversionToLambda

/**
 * Does this reference need to be converted to a lambda
 * (i.e. var args need to be expanded or "super" is used)
 */
final boolean needsConversionToLambda() {
    return interfaceParameterIsIntersectionType() ||
            isSuper ||
            needsVarArgsConversion() ||
            isArrayOp() ||
            isPrivateInOtherClass() ||
            isProtectedInSuperClassOfEnclosingClassInOtherPackage() ||
            !receiverAccessible() ||
            (tree.getMode() == ReferenceMode.NEW &&
              tree.kind != ReferenceKind.ARRAY_CTOR &&
              (tree.sym.owner.isLocal() || tree.sym.owner.isInner()));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:LambdaToMethod.java

示例4: visitReference

@Override
public void visitReference(JCMemberReference tree) {
  super.visitReference(tree);
  if (tree.getMode() != ReferenceMode.NEW) {
    return;
  }
  if (memberOfEnclosing(owner, state, tree.expr.type.tsym)) {
    referencesOuter = true;
  }
}
 
开发者ID:google,项目名称:error-prone,代码行数:10,代码来源:CanBeStaticAnalyzer.java


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