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


Java ArrayUtil.EMPTY_CLASS_ARRAY属性代码示例

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


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

示例1: getConstructorParameterTypes

private static Class[] getConstructorParameterTypes(final Class aClass, final Object... constructorArgs) {
  if (constructorArgs.length == 0) return ArrayUtil.EMPTY_CLASS_ARRAY;

  loop: for (final Constructor constructor : aClass.getDeclaredConstructors()) {
    final Class[] parameterTypes = constructor.getParameterTypes();
    if (parameterTypes.length == constructorArgs.length) {
      for (int i = 0; i < parameterTypes.length; i++) {
        Class parameterType = parameterTypes[i];
        final Object constructorArg = constructorArgs[i];
        if (!parameterType.isInstance(constructorArg) && constructorArg != null) {
          continue loop;
        }
      }
      return constructor.getParameterTypes();
    }
  }
  throw new AssertionError("Cannot find constructor for arguments: " + Arrays.asList(constructorArgs));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AdvancedProxy.java

示例2: create

@Override
protected Class[] create(String key) {
  final ArrayList<Class> result = new ArrayList<Class>(1);
  final List<String> typeList = key == null? null : Arrays.asList(key.split(",|\\s"));
  for (PatternClassBean bean : PATTERN_CLASS_EP.getExtensions()) {
    if (typeList == null || typeList.contains(bean.getAlias())) result.add(bean.getPatternClass());
  }
  return result.isEmpty()? ArrayUtil.EMPTY_CLASS_ARRAY : result.toArray(new Class[result.size()]);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PatternCompilerFactoryImpl.java

示例3: loadClass

/**
 * Like loadView, but doesn't log  exceptions if failed and doesn't try to create a mock view.
 */
@Nullable
public Object loadClass(String className, Class[] constructorSignature, Object[] constructorArgs) throws ClassNotFoundException {
  // RecyclerView.Adapter is an abstract class, but its instance is needed for RecyclerView to work correctly. So, when LayoutLib asks for
  // its instance, we define a new class which extends the Adapter class.
  if (RecyclerViewHelper.CN_RV_ADAPTER.equals(className)) {
    className = RecyclerViewHelper.CN_CUSTOM_ADAPTER;
    constructorSignature = ArrayUtil.EMPTY_CLASS_ARRAY;
    constructorArgs = ArrayUtil.EMPTY_OBJECT_ARRAY;
  }
  return loadClass(className, constructorSignature, constructorArgs, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ViewLoader.java

示例4: processRootsByClassNames

private static boolean processRootsByClassNames(@NotNull PsiFile file, @Nullable String type, @NotNull Processor<PsiElement> processor) {
  Project project = file.getProject();
  Set<String> classNames = collectDevPatternClassNames(project);
  if (!classNames.isEmpty()) {
    JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
    for (String className : classNames) {
      PsiClass patternClass = psiFacade.findClass(className, GlobalSearchScope.allScope(project));
      if (patternClass != null && !processor.process(patternClass)) return false;
    }
  }
  Class[] classes = StringUtil.isEmpty(type) ? ArrayUtil.EMPTY_CLASS_ARRAY : PatternCompilerFactory.getFactory().getPatternClasses(type);
  return classes.length == 0 || processor.process(getRootByClasses(file, classes));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:PatternEditorContextMembersProvider.java

示例5: MnemonicHelper

/**
 * @see #init(Component)
 * @deprecated do not use this object as a tree watcher
 */
@Deprecated
public MnemonicHelper() {
  super(ArrayUtil.EMPTY_CLASS_ARRAY);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MnemonicHelper.java

示例6: JavaMethodSignature

public JavaMethodSignature(final String methodName, final Class... methodParameters) {
  myMethodName = methodName;
  myMethodParameters = methodParameters.length == 0 ? ArrayUtil.EMPTY_CLASS_ARRAY : methodParameters;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:JavaMethodSignature.java

示例7: getChooserTypes

@Override
public Type[] getChooserTypes() {
  return ArrayUtil.EMPTY_CLASS_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DomChildrenTest.java

示例8: getPatternClasses

@NotNull
@Override
public Class[] getPatternClasses() {
  return ArrayUtil.EMPTY_CLASS_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TemporaryPlacesRegistry.java

示例9: getPatternClasses

@NotNull
public static Class[] getPatternClasses(final String supportId) {
  final LanguageInjectionSupport support = findInjectionSupport(supportId);
  return support == null ? ArrayUtil.EMPTY_CLASS_ARRAY : support.getPatternClasses();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:InjectorUtils.java

示例10: UserActivityWatcher

public UserActivityWatcher() {
  this(ArrayUtil.EMPTY_CLASS_ARRAY);

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:UserActivityWatcher.java

示例11: getSuitableClasses

/**
 * Returns the list of PSI element classes which are shown as structure view elements.
 * When determining the current editor element, the PSI tree is walked up until an element
 * matching one of these classes is found.
 *
 * @return the list of classes
 */
@NotNull
protected Class[] getSuitableClasses() {
  return ArrayUtil.EMPTY_CLASS_ARRAY;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TextEditorBasedStructureViewModel.java


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