本文整理汇总了Java中com.jetbrains.php.PhpIndex.getInterfacesByFQN方法的典型用法代码示例。如果您正苦于以下问题:Java PhpIndex.getInterfacesByFQN方法的具体用法?Java PhpIndex.getInterfacesByFQN怎么用?Java PhpIndex.getInterfacesByFQN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jetbrains.php.PhpIndex
的用法示例。
在下文中一共展示了PhpIndex.getInterfacesByFQN方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClassInterfaceResolveResult
import com.jetbrains.php.PhpIndex; //导入方法依赖的package包/类
static public List<ResolveResult> getClassInterfaceResolveResult(Project project, String FQNClassOrInterfaceName) {
PhpIndex phpIndex = PhpIndex.getInstance(project);
Collection<PhpClass> phpClasses = phpIndex.getClassesByFQN(FQNClassOrInterfaceName);
Collection<PhpClass> phpInterfaces = phpIndex.getInterfacesByFQN(FQNClassOrInterfaceName);
List<ResolveResult> results = new ArrayList<ResolveResult>();
for (PhpClass phpClass : phpClasses) {
results.add(new PsiElementResolveResult(phpClass));
}
for (PhpClass phpInterface : phpInterfaces) {
results.add(new PsiElementResolveResult(phpInterface));
}
return results;
}
示例2: fillResolveResults
import com.jetbrains.php.PhpIndex; //导入方法依赖的package包/类
@Override
public void fillResolveResults(PsiElement psiElement, List<ResolveResult> results, String typeName) {
PhpIndex phpIndex = PhpIndex.getInstance(psiElement.getProject());
for (PhpClass phpClass : phpIndex.getInterfacesByFQN(PhpLangUtil.toFQN(typeName))) {
results.add(new PsiElementResolveResult(phpClass));
}
}
示例3: resolveParameter
import com.jetbrains.php.PhpIndex; //导入方法依赖的package包/类
@NotNull
protected Collection<PhpClass> resolveParameter(@NotNull PhpIndex phpIndex, @NotNull String parameter) {
return phpIndex.getInterfacesByFQN(parameter);
}
示例4: getInterface
import com.jetbrains.php.PhpIndex; //导入方法依赖的package包/类
@Nullable
static public PhpClass getInterface(PhpIndex phpIndex, String className) {
Collection<PhpClass> classes = phpIndex.getInterfacesByFQN(className);
return classes.isEmpty() ? null : classes.iterator().next();
}