Creates an object representation of a Location Rule. An array of such objects is used as parameter of findElementsByLRules() function.

Note: Use Location Rule Builder (found at the left panel's tree) to quickly construct a Location Rule instantly encoded as a LocationRule() function call.

Parameters:

ruleSpec
The string specification of the Location Rule.
recursive
Specifies if this is a Recursive Location Rule. (When omitted, the default value is false.)
matchingCondQuery
Deprecated. Specifies the Matching Condition of the Location Rule.

This parameter is remained for compatibility with older templates. Now, the Matching Condition is a part of the rule specification itself.

See Also:
findElementsByLRules(), findElementsByLPath(), BooleanQuery()
Example:

LocationRule (
  "* -> extends^::(Class|Interface)", 
  true
)
See discussion about this particular Location Rule in Using Location Rules | Example. ${include ../../../refs/lrules.htm}