The `getRule()` method in the `com.google.devtools.build.lib.analysis.RuleContext` class is used to retrieve the rule definition associated with the current build target. It returns an object representing the rule, which can then be used to access various attributes and methods related to the rule. This method is commonly used in Build Rules to perform analysis, validation, or execution tasks based on the specific characteristics of the rule being processed.
Java RuleContext.getRule - 26 examples found. These are the top rated real world Java examples of com.google.devtools.build.lib.analysis.RuleContext.getRule extracted from open source projects. You can rate examples to help us improve the quality of examples.