Java Code Examples for com.jetbrains.php.lang.PhpLangUtil#equalsMethodNames()

The following examples show how to use com.jetbrains.php.lang.PhpLangUtil#equalsMethodNames() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PhpDocUtil.java    From idea-php-toolbox with MIT License 6 votes vote down vote up
private static ArrayList<Method> getImplementedMethods(@Nullable PhpClass phpClass, @NotNull Method method, ArrayList<Method> implementedMethods) {
    if (phpClass == null) {
        return implementedMethods;
    }

    Method[] methods = phpClass.getOwnMethods();
    for (Method ownMethod : methods) {
        if (PhpLangUtil.equalsMethodNames(ownMethod.getName(), method.getName())) {
            implementedMethods.add(ownMethod);
        }
    }

    for(PhpClass interfaceClass: phpClass.getImplementedInterfaces()) {
        getImplementedMethods(interfaceClass, method, implementedMethods);
    }

    getImplementedMethods(phpClass.getSuperClass(), method, implementedMethods);

    return implementedMethods;
}
 
Example 2
Source File: PhpDocUtil.java    From idea-php-toolbox with MIT License 6 votes vote down vote up
private static ArrayList<Method> getImplementedMethods(@Nullable PhpClass phpClass, @NotNull Method method, ArrayList<Method> implementedMethods) {
    if (phpClass == null) {
        return implementedMethods;
    }

    Method[] methods = phpClass.getOwnMethods();
    for (Method ownMethod : methods) {
        if (PhpLangUtil.equalsMethodNames(ownMethod.getName(), method.getName())) {
            implementedMethods.add(ownMethod);
        }
    }

    for(PhpClass interfaceClass: phpClass.getImplementedInterfaces()) {
        getImplementedMethods(interfaceClass, method, implementedMethods);
    }

    getImplementedMethods(phpClass.getSuperClass(), method, implementedMethods);

    return implementedMethods;
}
 
Example 3
Source File: PhpElementsUtil.java    From idea-php-symfony2-plugin with MIT License 6 votes vote down vote up
private static ArrayList<Method> getImplementedMethods(@Nullable PhpClass phpClass, @NotNull Method method, ArrayList<Method> implementedMethods) {
    if (phpClass == null) {
        return implementedMethods;
    }

    Method[] methods = phpClass.getOwnMethods();
    for (Method ownMethod : methods) {
        if (PhpLangUtil.equalsMethodNames(ownMethod.getName(), method.getName())) {
            implementedMethods.add(ownMethod);
        }
    }

    for(PhpClass interfaceClass: phpClass.getImplementedInterfaces()) {
        getImplementedMethods(interfaceClass, method, implementedMethods);
    }

    getImplementedMethods(phpClass.getSuperClass(), method, implementedMethods);

    return implementedMethods;
}