Check whether a class matches the given `ClassNameContext`, or allow it through if not loaded. Returns `Some(true)` when the class is loaded and passes `context.matches()`, `Some(false)` when loaded but rejected, and `None` when the class could not be loaded at all. Callers should hard-exclude on `Some(false)`, pass through on `None` (with optional heuristic demotion via [`ClassNameContext::like
(&self, class_name: &str, context: ClassNameContext)
| 2063 | /// [`ClassNameContext::likely_mismatch`]), and include on |
| 2064 | /// `Some(true)` without demotion. |
| 2065 | fn check_context_match(&self, class_name: &str, context: ClassNameContext) -> Option<bool> { |
| 2066 | // load_stub_class checks uri_classes_index first, then parses in-memory |
| 2067 | // stubs if needed. No disk I/O. |
| 2068 | if let Some(cls) = self.load_stub_class(class_name) { |
| 2069 | return Some(context.matches(&cls)); |
| 2070 | } |
| 2071 | // Truly unknown. |
| 2072 | None |
| 2073 | } |
| 2074 | |
| 2075 | /// Check whether `class_name` exists in any class source (uri_classes_index, |
| 2076 | /// fqn_uri_index, or stub_index). |
no test coverage detected