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


Java PhpClass.getSuperClass方法代码示例

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


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

示例1: buildVisitor

import com.jetbrains.php.lang.psi.elements.PhpClass; //导入方法依赖的package包/类
@NotNull
@Override
public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder problemsHolder, boolean isOnTheFly) {
    return new PhpElementVisitor() {
        @Override
        public void visitPhpClass(PhpClass clazz) {
            if (clazz.getSuperClass() != null && clazz.getSuperClass().getFQN().equals("\\yii\\db\\ActiveQuery")) {
                PhpIndex index = PhpIndex.getInstance(clazz.getProject());

                PhpClass activeRecordClass = ClassUtils.findClassInSeeTags(index, clazz, "\\yii\\db\\BaseActiveRecord");
                if (activeRecordClass == null) {
                    problemsHolder.registerProblem(clazz.getFirstChild(),
                            "Can not find connected ActiveRecord class.\nYou should add @see tag with linked ActiveRecord",
                            ProblemHighlightType.WEAK_WARNING);
                }
            }
            super.visitPhpClass(clazz);

        }
    };
}
 
开发者ID:nvlad,项目名称:yii2support,代码行数:22,代码来源:MissingActiveRecordInActiveQueryInspection.java

示例2: processClass

import com.jetbrains.php.lang.psi.elements.PhpClass; //导入方法依赖的package包/类
private static void processClass(@NotNull PhpClass clazz, @NotNull Set<PhpClass> processed) {
    if (clazz.isInterface()) {
        throw new InvalidParameterException("Interface shall not be provided");
    }
    processed.add(clazz);

    /* re-delegate interface handling */
    for (PhpClass anInterface : clazz.getImplementedInterfaces()) {
        processInterface(anInterface, processed);
    }

    /* handle parent class */
    if (null != clazz.getSuperClass()) {
        processClass(clazz.getSuperClass(), processed);
    }
}
 
开发者ID:kalessil,项目名称:yii2inspections,代码行数:17,代码来源:InheritanceChainExtractUtil.java

示例3: isImplementationOfInterface

import com.jetbrains.php.lang.psi.elements.PhpClass; //导入方法依赖的package包/类
protected boolean isImplementationOfInterface(PhpClass phpClass, PhpClass phpInterface) {
    if (phpClass == phpInterface) {
        return true;
    }

    for (PhpClass implementedInterface : phpClass.getImplementedInterfaces()) {
        if (isImplementationOfInterface(implementedInterface, phpInterface)) {
            return true;
        }
    }

    if (null == phpClass.getSuperClass()) {
        return false;
    }

    return isImplementationOfInterface(phpClass.getSuperClass(), phpInterface);
}
 
开发者ID:Haehnchen,项目名称:idea-php-toolbox,代码行数:18,代码来源:Symfony2InterfacesUtil.java

示例4: isInstanceOf

import com.jetbrains.php.lang.psi.elements.PhpClass; //导入方法依赖的package包/类
public boolean isInstanceOf(@NotNull PhpClass subjectClass, @NotNull PhpClass expectedClass) {

        // we have equal class instance, on non multiple classes with same name fallback to namespace and classname
        if (subjectClass == expectedClass || PhpElementsUtil.isEqualClassName(subjectClass, expectedClass)) {
            return true;
        }

        if (expectedClass.isInterface()) {
            return isImplementationOfInterface(subjectClass, expectedClass);
        }

        if (null == subjectClass.getSuperClass()) {
            return false;
        }

        return isInstanceOf(subjectClass.getSuperClass(), expectedClass);
    }
 
开发者ID:Haehnchen,项目名称:idea-php-toolbox,代码行数:18,代码来源:Symfony2InterfacesUtil.java


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