public List locationsOfLine()

in src/main/java/com/jetbrains/jdi/ReferenceTypeImpl.java [1153:1187]


    public List<Location> locationsOfLine(String stratumID,
                                String sourceName,
                                int lineNumber)
                           throws AbsentInformationException {
        // A method that should have info, didn't
        boolean someAbsent = false;
        // A method that should have info, did
        boolean somePresent = false;
        List<Method> methods = methods();
        SDE.Stratum stratum = stratum(stratumID);

        List<Location> list = new ArrayList<>();

        for (Method value : methods) {
            MethodImpl method = (MethodImpl) value;
            // eliminate native and abstract to eliminate
            // false positives
            if (!method.isAbstract() &&
                    !method.isNative()) {
                try {
                    list.addAll(
                            method.locationsOfLine(stratum,
                                    sourceName,
                                    lineNumber));
                    somePresent = true;
                } catch (AbsentInformationException exc) {
                    someAbsent = true;
                }
            }
        }
        if (someAbsent && !somePresent) {
            throw new AbsentInformationException();
        }
        return list;
    }