本文整理汇总了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));
}
示例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()]);
}
示例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);
}
示例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));
}
示例5: MnemonicHelper
/**
* @see #init(Component)
* @deprecated do not use this object as a tree watcher
*/
@Deprecated
public MnemonicHelper() {
super(ArrayUtil.EMPTY_CLASS_ARRAY);
}
示例6: JavaMethodSignature
public JavaMethodSignature(final String methodName, final Class... methodParameters) {
myMethodName = methodName;
myMethodParameters = methodParameters.length == 0 ? ArrayUtil.EMPTY_CLASS_ARRAY : methodParameters;
}
示例7: getChooserTypes
@Override
public Type[] getChooserTypes() {
return ArrayUtil.EMPTY_CLASS_ARRAY;
}
示例8: getPatternClasses
@NotNull
@Override
public Class[] getPatternClasses() {
return ArrayUtil.EMPTY_CLASS_ARRAY;
}
示例9: getPatternClasses
@NotNull
public static Class[] getPatternClasses(final String supportId) {
final LanguageInjectionSupport support = findInjectionSupport(supportId);
return support == null ? ArrayUtil.EMPTY_CLASS_ARRAY : support.getPatternClasses();
}
示例10: UserActivityWatcher
public UserActivityWatcher() {
this(ArrayUtil.EMPTY_CLASS_ARRAY);
}
示例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;
}