class
Analyzer::Java::Struts2
- Analyzer::Java::Struts2
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/java/struts2.crConstant Summary
-
DEFAULT_LOCATORS =
["action", "actions", "struts", "struts2"] -
REST_METHODS =
{"index" => {"GET", ""}, "show" => {"GET", "/:id"}, "edit" => {"GET", "/:id/edit"}, "editNew" => {"GET", "/new"}, "deleteConfirm" => {"GET", "/:id/deleteConfirm"}, "create" => {"POST", ""}, "update" => {"PUT", "/:id"}, "destroy" => {"DELETE", "/:id"}} -
STRUTS_CONFIG_BASENAMES =
Set {"struts.xml", "struts-plugin.xml", "struts-deferred.xml"} -
STRUTS_JAVA_SOURCE_RE =
Regex.union("org.apache.struts2", "com.opensymphony.xwork2", "@Action", "@Namespace") -
struts_java_source?gates the per-file convention-action scan; one precompiledRegex.unionscan (PCRE2 JIT, auto-escapes each literal) replaces 4 separateString#includes?passes over the same buffer. -
VALUE_KEY_PATTERN =
/(?:^|[,({]\s*)value\s*=\s*"((?:\\.|[^"\\])*)"/m -
Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile). Every caller probes the
valuekey, so precompile its matcher once at load time.