public class XpathFileGeneratorAstFilter extends AutomaticBean implements TreeWalkerFilter
TreeWalkerAuditEvent and generates corresponding xpath query.
Stores localized messages and xpath queries map inside static variable
for XpathFileGeneratorAuditListener.
See issue #102 https://github.com/checkstyle/checkstyle/issues/102AutomaticBean.OutputStreamOptions| Constructor and Description |
|---|
XpathFileGeneratorAstFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(TreeWalkerAuditEvent event)
Determines whether or not a filtered
TreeWalkerAuditEvent is accepted. |
static String |
findCorrespondingXpathQuery(AuditEvent event)
Returns xpath query corresponding to localized message of the
TreeWalkerAuditEvent object which points to the same AST element as specified
AuditEvent object. |
protected void |
finishLocalSetup()
Provides a hook to finish the part of this component's setup that
was not handled by the bean introspection.
|
void |
setTabWidth(int tabWidth)
Sets tab width.
|
configure, contextualize, getConfiguration, setupChildpublic XpathFileGeneratorAstFilter()
public void setTabWidth(int tabWidth)
tabWidth - the distance between tab stopspublic static String findCorrespondingXpathQuery(AuditEvent event)
TreeWalkerAuditEvent object which points to the same AST element as specified
AuditEvent object.event - the AuditEvent object.protected void finishLocalSetup()
AutomaticBeanThe default implementation does nothing.
finishLocalSetup in class AutomaticBeanpublic boolean accept(TreeWalkerAuditEvent event)
TreeWalkerFilterTreeWalkerAuditEvent is accepted.accept in interface TreeWalkerFilterevent - the TreeWalkerAuditEvent to filter.Copyright © 2001–2020. All rights reserved.