Logo Search packages:      
Sourcecode: visualvm version File versions  Download package

boolean org::netbeans::lib::profiler::global::InstrumentationFilter::passesFilter ( String  string  )  [inline]

Returns true if the given string passes the current filter

Definition at line 213 of file InstrumentationFilter.java.

Referenced by org::netbeans::lib::profiler::instrumentation::RecursiveMethodInstrumentor2::checkAndScanMethod(), and org::netbeans::lib::profiler::instrumentation::RecursiveMethodInstrumentor1::locateAndMarkMethodReachable().

                                               {
        //if (string == null) return; // don't be paranoid:o)
        if (instrFilterType == INSTR_FILTER_NONE) {
            return true;
        }

        if (instrFilterStrings.length == 0) {
            return true;
        }

        boolean filterInclusive = (instrFilterType == INSTR_FILTER_INCLUSIVE);

        if (filterInclusive) {
            for (int i = 0; i < instrFilterStrings.length; i++) {
                if (matches(string, instrFilterStrings[i])) {
                    return true;
                }
            }
        } else {
            for (int i = 0; i < instrFilterStrings.length; i++) {
                if (matches(string, instrFilterStrings[i])) {
                    return false;
                }
            }
        }

        if (filterInclusive) {
            return false;
        } else {
            return true;
        }
    }


Generated by  Doxygen 1.6.0   Back to index