class

Analyzer::Java::Armeria

Inherits Analyzer < FileHelper < Reference < Object

Constants

HTTP_METHOD_ANNOTATIONS = ["Get", "Post", "Put", "Delete", "Patch", "Head", "Options", "Trace"]

HTTP method annotation names supported by Armeria's annotated service style. Simple names — fully-qualified forms like @com.linecorp.armeria.server.annotation.Get are normalised to the last segment before lookup.

HTTP_METHOD_NAMES = Set {"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"}
PATH_ANNOTATION = "Path"
PATH_PREFIX_ANNOTATION = "PathPrefix"
REGEX_SERVER_BUILDER = /Server\s*\.builder\(\s*\)/

Anchor only — the chain body is bounded by a depth-aware scan so semicolons inside lambda/anonymous-class bodies do not truncate the match, and a trailing . after build() is not required (Server s = Server.builder()...build();).

ROUTE_VERB_CALL_PATTERNS = ROUTE_VERB_METHODS.map do |method_name, http_method| {method_name, http_method, /\.\s*#{method_name}\s*\(([^)]*)\)/m} end

Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile) — precompile the fixed per-verb call matchers once at load time instead of per route expression.

ROUTE_VERB_METHODS = {"get" => "GET", "post" => "POST", "put" => "PUT", "delete" => "DELETE", "patch" => "PATCH", "head" => "HEAD", "options" => "OPTIONS", "trace" => "TRACE"}

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