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


Java PsiMethod.EMPTY_ARRAY属性代码示例

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


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

示例1: getMethodsByName

@Override
@NotNull
public PsiMethod[] getMethodsByName(@NotNull String name, @NotNull GlobalSearchScope scope) {
  Merger<PsiMethod> merger = null;
  for (PsiShortNamesCache cache : myCaches) {
    PsiMethod[] methods = cache.getMethodsByName(name, scope);
    if (methods.length != 0) {
      if (merger == null) merger = new Merger<PsiMethod>();
      merger.add(methods);
    }
  }
  PsiMethod[] result = merger == null ? null : merger.getResult();
  return result == null ? PsiMethod.EMPTY_ARRAY : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:CompositeShortNamesCache.java

示例2: getMethodsByNameIfNotMoreThan

@Override
@NotNull
public PsiMethod[] getMethodsByNameIfNotMoreThan(@NonNls @NotNull final String name, @NotNull final GlobalSearchScope scope, final int maxCount) {
  Merger<PsiMethod> merger = null;
  for (PsiShortNamesCache cache : myCaches) {
    PsiMethod[] methods = cache.getMethodsByNameIfNotMoreThan(name, scope, maxCount);
    if (methods.length == maxCount) return methods;
    if (methods.length != 0) {
      if (merger == null) merger = new Merger<PsiMethod>();
      merger.add(methods);
    }
  }
  PsiMethod[] result = merger == null ? null : merger.getResult();
  return result == null ? PsiMethod.EMPTY_ARRAY : result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CompositeShortNamesCache.java

示例3: getMethodsByName

@NotNull
@Override
public PsiMethod[] getMethodsByName(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
  if (!myComponent.hasAnyDataBindingEnabledFacet()) {
    return PsiMethod.EMPTY_ARRAY;
  }
  List<PsiMethod> methods = myMethodsByNameCache.getValue().get(name);
  return filterByScope(methods, scope, PsiMethod.class, PsiMethod.EMPTY_ARRAY);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:DataBindingShortNamesCache.java

示例4: getMethodsByNameIfNotMoreThan

@NotNull
@Override
public PsiMethod[] getMethodsByNameIfNotMoreThan(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope, int maxCount) {
  if (!myComponent.hasAnyDataBindingEnabledFacet()) {
    return PsiMethod.EMPTY_ARRAY;
  }
  PsiMethod[] methods = getMethodsByName(name, scope);
  if (methods.length > maxCount) {
    return PsiMethod.EMPTY_ARRAY;
  }
  return methods;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DataBindingShortNamesCache.java

示例5: getMethodsByName

@Override
@NotNull
public PsiMethod[] getMethodsByName(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
  final Collection<? extends PsiMethod> methods = StubIndex.getElements(GrMethodNameIndex.KEY, name, myProject,
                                                                        new GrSourceFilterScope(scope), GrMethod.class);
  final Collection<? extends PsiMethod> annMethods = StubIndex.getElements(GrAnnotationMethodNameIndex.KEY, name, myProject,
                                                                           new GrSourceFilterScope(scope),
                                                                           GrAnnotationMethod.class);
  if (methods.isEmpty() && annMethods.isEmpty()) return PsiMethod.EMPTY_ARRAY;
  return ArrayUtil.mergeCollections(annMethods, methods, PsiMethod.ARRAY_FACTORY);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GroovyShortNamesCache.java

示例6: createImplementationPrototypes

@NotNull
@Override
public PsiMethod[] createImplementationPrototypes(PsiClass inClass, PsiMethod method) throws IncorrectOperationException {
  if (!(inClass instanceof GrTypeDefinition && method instanceof GrTraitMethod)) return PsiMethod.EMPTY_ARRAY;

  final PsiClass containingClass = method.getContainingClass();
  PsiSubstitutor substitutor = inClass.isInheritor(containingClass, true) ? TypeConversionUtil.getSuperClassSubstitutor(containingClass, inClass, PsiSubstitutor.EMPTY)
                                                                          : PsiSubstitutor.EMPTY;
  return new GrMethod[]{GroovyOverrideImplementUtil.generateTraitMethodPrototype((GrTypeDefinition)inClass, (GrTraitMethod)method, substitutor)};
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TraitMethodImplementor.java

示例7: checkSuperMethods

@NotNull
public static PsiMethod[] checkSuperMethods(@NotNull PsiMethod method, @NotNull String actionString, @NotNull Collection<PsiElement> ignore) {
  PsiClass aClass = method.getContainingClass();
  if (aClass == null) return new PsiMethod[]{method};

  final Collection<PsiMethod> superMethods = DeepestSuperMethodsSearch.search(method).findAll();
  superMethods.removeAll(ignore);

  if (superMethods.isEmpty()) {
    PsiMethod siblingSuperMethod = FindSuperElementsHelper.getSiblingInheritedViaSubClass(method);
    if (siblingSuperMethod != null) {
      superMethods.add(siblingSuperMethod);
    }
  }
  if (superMethods.isEmpty()) return new PsiMethod[]{method};


  Set<String> superClasses = new HashSet<String>();
  boolean superAbstract = false;
  boolean parentInterface = false;
  for (final PsiMethod superMethod : superMethods) {
    final PsiClass containingClass = superMethod.getContainingClass();
    superClasses.add(containingClass.getQualifiedName());
    final boolean isInterface = containingClass.isInterface();
    superAbstract |= isInterface || superMethod.hasModifierProperty(PsiModifier.ABSTRACT);
    parentInterface |= isInterface;
  }

  SuperMethodWarningDialog dialog =
      new SuperMethodWarningDialog(method.getProject(), DescriptiveNameUtil.getDescriptiveName(method), actionString, superAbstract,
                                   parentInterface, aClass.isInterface(), ArrayUtil.toStringArray(superClasses));
  dialog.show();

  if (dialog.getExitCode() == DialogWrapper.OK_EXIT_CODE) {
    return superMethods.toArray(new PsiMethod[superMethods.size()]);
  }
  if (dialog.getExitCode() == SuperMethodWarningDialog.NO_EXIT_CODE) {
    return new PsiMethod[]{method};
  }

  return PsiMethod.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:SuperMethodWarningUtil.java

示例8: getMethodsByName

@NotNull
@Override
public PsiMethod[] getMethodsByName(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
  return PsiMethod.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:BrShortNamesCache.java

示例9: getMethodsByNameIfNotMoreThan

@NotNull
@Override
public PsiMethod[] getMethodsByNameIfNotMoreThan(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope, int maxCount) {
  return PsiMethod.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:BrShortNamesCache.java

示例10: getMethodsToImplement

@NotNull
@Override
public PsiMethod[] getMethodsToImplement(PsiClass aClass) {
  return PsiMethod.EMPTY_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TraitMethodImplementor.java


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