NAME
Developer::Dashboard::CLI::OpenFileJavaSource - Java source-lookup support for dashboard of
SYNOPSIS
use Developer::Dashboard::CLI::OpenFileJavaSource qw(_java_archive_source_matches);
my @matches = _java_archive_source_matches(
paths => $paths, roots => \@roots, name => $class_name,
relative => $relative_path, online => 0,
);
DESCRIPTION
Extracted from Developer::Dashboard::CLI::OpenFile (DD-918) to keep that module under this project's 500-line-per-module guideline. Holds the entire Java-class-to-source-file resolution subsystem: local source-archive scanning, zip/jar extraction with path-containment protection, and the opt-in Maven Central download fallback (DD-914).
PURPOSE
Resolves a fully qualified Java class name (e.g. javax.jws.WebService) to its source file, searching local .jar/.war/source-archive files first and, only when explicitly permitted via online => 1, falling back to downloading a matching source jar from Maven Central.
WHY IT EXISTS
Developer::Dashboard::CLI::OpenFile mixed CLI dispatch, the interactive chooser, scope-search ranking, and this entire archive/network subsystem in one 961-line file. The Java-source-lookup machinery has no dependency on the rest of that file's search logic beyond two small shared helpers (_unique_matches, _unique_existing_dirs, both provided by Developer::Dashboard::CLI::OpenFileUtil), making it a natural, low-risk seam.
WHEN TO USE
Use this file when changing how Java source archives are located, how zip/jar members are extracted and cache-contained, or how the Maven Central download fallback behaves.
HOW TO USE
use Developer::Dashboard::CLI::OpenFileJavaSource qw(_java_archive_source_matches);
Called by Developer::Dashboard::CLI::OpenFile's _named_source_matches once it has determined the requested name is a dotted Java class name (not a Perl ::-separated module name) and no live .java file already satisfies it.
WHAT USES IT
Developer::Dashboard::CLI::OpenFile's _named_source_matches, and this module's own coverage tests.
EXAMPLES
_java_archive_source_matches(
paths => $paths,
roots => \@roots,
name => 'javax.jws.WebService',
relative => 'javax/jws/WebService.java',
online => 1,
);