class

Analyzer::Java::Armeria::ArmeriaChainGuards

Inherits Reference < Object

Which registrations of one Server.builder() chain an AuthService decorator covers, read from the chain's own top-level calls:

  • .decorator(AuthService...) on the server covers every route of this chain; .decorator("/p", ...) the route its path pattern names (exact, or prefix:/glob:/* forms), and .decoratorUnder("/p", ...) the routes under /p.
  • a decorator inside .route()...build(svc), .annotatedService() ...build(svc) or .virtualHost(...)...and() covers that block only, and one passed in a registration's arguments (.service("/x", svc.decorate(AuthService.newDecorator(a)))) that registration only.

The chain ends at the server's own .build(), so a second Server.builder() in the same statement or file is not covered. Decorators are looked for in code_only (comments and string literals blanked), so neither a commented-out decorator nor a string that spells one counts; path patterns are read from code.

ponytail: a decorator held in a variable (.decorator(authDecorator)) is not resolved; neither are separate sb.decorator(...) statements nor regex: path patterns.

Constants

AUTH_DECORATOR = /\b(?:Http)?AuthService\s*\.\s*(?:newDecorator\w*|builder)\s*\(/
SUB_CHAIN_CLOSERS = {"route" => "build", "annotatedService" => "build", "virtualHost" => "and", "defaultVirtualHost" => "and", "contextPath" => "and"}

Constructors

new(code : String, code_only : String, from : Int32)
Source

Class methods

chain_calls(chars : Array(Char), from : Int32) : Array(Call)

The top-level .name(args) calls of a fluent chain, from from until the first text that does not continue it. A Kotlin trailing lambda belongs to the call before it; Java's explicit type arguments (.<T>service() are skipped. Works on chars so a caller with many chains in one file splits it into chars once.

Source

Instance methods

guarded?(offset : Int32, url : String) : Bool
Source

Nested types