com.puppycrawl.tools.checkstyle.checks.indentation

Class 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.

Constructor Details

HandlerFactory

public HandlerFactory()
Creates a HandlerFactory.

Method Details

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


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