Java
For java
the syntax is as follows:
and inside inner block as follows:
[<entry> [<identifier> [<parameters>]]] [<inner-block>]
# or
[<identifier> [<parameters>]] [<inner-block>]
Example
language: 'java'
scope: 'all'
scan-source: 'false'
$class {
extends 'java.lang.Runnable'
implements 'my.package.Interface'
has-method 'doSomething' { has-param 'java.lang.String _' }
}
This piece of code tells everything! no need to describe what you will find...
Note
all the variables, identifiers, parameters and properties with their possible values are documented. you can see the documentation right inside the IDE in completion and using quick doc Ctrl+Q.
Properties
scope
: the search scope: can beproject
orall
scan-source
: if set tofalse
the search uses stubs only, otherwise full sources will be scanned
Variables ($...)
$type
: any type: class, interface, ...$class
$interface
$annotation
$method
Identifiers
has-param
: checks that this method has exactly all the parameters specifiedwith-param
: likehas-param
, but checks that at least these parameters are presentname-matches
: checks that the name of the entry matches this regexpsuper-of
: checks that this type is the super type of all types specified in parametersextends
: checks that this type extends all the types specified in parametersimplements
: checks that this type implements all the interfaces specified in parametersdirect-super-of
: check that this type is directly the super type of all types specified in parametersextends-directly
: check that this type directly extends all the types specified in parametersimplements-directly
: check that this type directly implements all the interfaces specified in parametershas-modifier
: checks that this entry has at least all the modifiers specified in parametershas-method
: checks that this type has methods with names specified in parametershas-method-directly
: checks that this type has methods that are defined in the type itself, not just inheritedis-anonymous
: checks that this type is an anonymous classnot-anonymous
: checks that this type is not an anonymous class