Class HandlerFactory
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory
-
public class HandlerFactory extends java.lang.Object
Factory for handlers. Looks up constructor via reflection.
-
-
Constructor Summary
Constructors Constructor Description HandlerFactory()
Creates a HandlerFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCreatedHandlers()
Clears cache of created handlers.int[]
getHandledTypes()
Gets list of registered handler types.AbstractExpressionHandler
getHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
Get the handler for an AST.boolean
isHandledType(int type)
Returns true if this type (form TokenTypes) is handled.
-
-
-
Method Detail
-
isHandledType
public boolean isHandledType(int type)
Returns true if this type (form TokenTypes) is handled.- Parameters:
type
- 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 AbstractExpressionHandler getHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent)
Get the handler for an AST.- Parameters:
indentCheck
- the indentation checkast
- ast to handleparent
- the handler parent of this AST- Returns:
- the ExpressionHandler for ast
-
clearCreatedHandlers
public void clearCreatedHandlers()
Clears cache of created handlers.
-
-