org.apache.maven.plugin.checkstyle
Class RuleUtil

java.lang.Object
  extended by org.apache.maven.plugin.checkstyle.RuleUtil

public final class RuleUtil
extends Object

Tooling for Checkstyle rules conventions: names, categories.

Since:
2.13
Author:
Hervé Boutemy

Nested Class Summary
static interface RuleUtil.Matcher
          Audit event source name matcher.
 
Method Summary
static String getCategory(AuditEvent event)
          Get the rule category from an audit event.
static String getCategory(String eventSrcName)
          Get the rule category from an audit event source name.
static String getName(AuditEvent event)
          Get the rule name from an audit event.
static String getName(String eventSrcName)
          Get the rule name from an audit event source name.
static RuleUtil.Matcher[] parseMatchers(String[] specs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public static String getName(AuditEvent event)
Get the rule name from an audit event.

Parameters:
event - the audit event
Returns:
the rule name, which is the class name without package and removed eventual "Check" suffix

getName

public static String getName(String eventSrcName)
Get the rule name from an audit event source name.

Parameters:
eventSrcName - the audit event source name
Returns:
the rule name, which is the class name without package and removed eventual "Check" suffix

getCategory

public static String getCategory(AuditEvent event)
Get the rule category from an audit event.

Parameters:
event - the audit event
Returns:
the rule category, which is the last package name or "misc" or "extension"

getCategory

public static String getCategory(String eventSrcName)
Get the rule category from an audit event source name.

Parameters:
eventSrcName - the audit event source name
Returns:
the rule category, which is the last package name or "misc" or "extension"

parseMatchers

public static RuleUtil.Matcher[] parseMatchers(String[] specs)


Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.