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, setupChild
public 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()
AutomaticBean
The default implementation does nothing.
finishLocalSetup
in class AutomaticBean
public boolean accept(TreeWalkerAuditEvent event)
TreeWalkerFilter
TreeWalkerAuditEvent
is accepted.accept
in interface TreeWalkerFilter
event
- the TreeWalkerAuditEvent to filter.Copyright © 2001–2020. All rights reserved.