class

Analyzer::Java::JaxRs

Inherits Analyzer::Java::JavaEngine < Analyzer < FileHelper < Reference < Object

Constants

ADD_SERVLET_RE = /\.addServlet\s*\(/
APPLICATION_PATH_RE = Regex.union("ApplicationPath")
DERIVATIVE_MANIFEST_BASENAMES = Set {"pom.xml", "build.gradle", "build.gradle.kts"}

Manifest basenames a derivative framework can only show up in. Helidon MP's own quickstart is the concrete case: its JAX-RS resource classes carry no io.helidon import at all — the runtime is pulled in solely via pom.xml's io.helidon.microprofile.* dependencies, so a .java-only scan would never see the marker and JAX-RS would double-count those routes under java_jaxrs too.

DERIVATIVE_MARKERS_RE = /io\.quarkus|io\.dropwizard(?!\.metrics)|io\.helidon\.microprofile/

Frameworks that ride on JAX-RS but ship their own analyzer. Listing them here keeps the JAX-RS analyzer the fallback for vanilla Jersey / RESTEasy resources without double-counting. io.helidon.microprofile routes to Analyzer::Java::HelidonMp, which drives this same extractor under the java_helidon_mp tech. io.dropwizard.metrics is the standalone Metrics library, not the framework (see the detector's copy of this list).

IDENTIFIER_RE = /\A\w+\z/
JAXRS_OR_WEBSOCKET_SOURCE_RE = Regex.union("jakarta.ws.rs", "javax.ws.rs", "jakarta.websocket", "javax.websocket", "@ServerEndpoint")

jaxrs_or_websocket_source? gates the per-file tree-sitter parse; one precompiled Regex.union scan (PCRE2 JIT, auto-escapes each literal) replaces 5 separate String#includes? passes over the same buffer.

PACKAGES_CALL_RE = /\.\s*packages\s*\(([^)]*)\)/
SERVLET_CONTAINER_RE = /\bnew\s+ServletContainer\s*\(/
STRING_LITERAL_RE = /"([^"\\]*)"/
WS_RS_PACKAGE_RE = Regex.union("jakarta.ws.rs", "javax.ws.rs")

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source

Nested types