Package org.sonar.plugins.jcl.api.checks
Interface JclCheck
public interface JclCheck
The interface that should be implemented by all JCL checks.
-
Method Summary
Modifier and TypeMethodDescriptionvoidinit(InitContext context) Initialize the check and subscribe to relevant parts of the tree.
-
Method Details
-
init
Initialize the check and subscribe to relevant parts of the tree.
The check can subscribe to specific nodes of the tree by callingInitContext.register(Class, BiConsumer). For example, to subscribe to EXEC statements, the check can initialize like so:@Override public void init(InitContext context) { context.register(ExecStatement.class, (checkCtx, execStatementTree) -> { ... }); }
-