Class LensScanner
java.lang.Object
com.arc_e_tect.gradle.trackerlens.lens.LensScanner
Scans one classpath root - a directory or a jar, this plugin's own bundled resources or a
resolved
lensStyle dependency, no distinction - for the fixed
META-INF/arc-e-tect/tracker-lens/lenses/*.css convention and returns the Lenses
it finds.
This is the single method called both for this plugin's own bundled built-in lenses and for
every resolved external style pack: only the technical means of locating the classpath root
File to pass in differs between the two: it is never special-cased here. See
LensResolver for the cross-root merge, collision, and auto-namespacing logic that follows
scanning.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LensScanner
public LensScanner()Creates a newLensScanner.
-
-
Method Details
-
scan
ScansclasspathRootfor lenses.- Parameters:
classpathRoot- a directory or a.jarfile; must exist- Returns:
- the lenses found, in discovery order
- Throws:
org.gradle.api.GradleException- ifclasspathRootships two lens files that resolve to the same lower-cased id (a defensive check: within one pack, one directory is inherently one namespace, so this should not happen in practice)
-