pub const CLASS_METHOD_QUERY: &str = "(program\n  (block_comment)*\n  (line_comment)*\n  (class_declaration \n      (class_body\n          (method_declaration\n          \t(modifiers)* @modifier\n            (marker_annotation)* @annotation\n            type_parameters: (_)* @typeParameters\n            type: (_) @returnType\n            name: (_) @identifier\n\t\t        parameters: (_) @parameters\n            (throws)* @throws\n            )\n      )\n\t)\n)";
Expand description

Tree-sitter query that returns class method signatures

  • modifier: method modifiers
  • annotation: method annotations
  • returnType: method return type
  • identifier: method identifier
  • parameters: method parameters
  • throws: method throws