com.puppycrawl.tools.checkstyle.checks.indentation
Class HandlerFactory

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory

public class HandlerFactory
extends java.lang.Object

Factory for handlers. Looks up constructor via reflection.

Author:
jrichard

Constructor Summary
HandlerFactory()
          creates a HandlerFactory
 
Method Summary
 int[] getHandledTypes()
          gets list of registered handler types
 ExpressionHandler getHandler(IndentationCheck aIndentCheck, DetailAST aAst, ExpressionHandler aParent)
          Get the handler for an AST.
 boolean isHandledType(int aType)
          returns true if this type (form TokenTypes) is handled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerFactory

public HandlerFactory()
creates a HandlerFactory

Method Detail

isHandledType

public boolean isHandledType(int aType)
returns true if this type (form TokenTypes) is handled

Parameters:
aType - type from TokenTypes
Returns:
true if handler is registered, false otherwise

getHandledTypes

public int[] getHandledTypes()
gets list of registered handler types

Returns:
int[] of TokenType types

getHandler

public ExpressionHandler getHandler(IndentationCheck aIndentCheck,
                                    DetailAST aAst,
                                    ExpressionHandler aParent)
Get the handler for an AST.

Parameters:
aIndentCheck - the indentation check
aAst - ast to handle
aParent - the handler parent of this AST
Returns:
the ExpressionHandler for aAst

Back to the Checkstyle Home Page