com.puppycrawl.tools.checkstyle.checks
public final class CheckUtils extends Object
Method Summary | |
---|---|
static FullIdent | createFullType(DetailAST aTypeAST)
Creates FullIdent for given type node. |
static DetailAST | getFirstNode(DetailAST aNode)
Finds sub-node for given node minimal (line, column) pair. |
static List | getTypeParameterNames(DetailAST aNode)
Retrieves the names of the type parameters to the node. |
static List | getTypeParameters(DetailAST aNode)
Retrieves the type parameters to the node. |
static boolean | isElseIf(DetailAST aAST)
Returns whether a token represents an ELSE as part of an ELSE / IF set. |
static boolean | isEqualsMethod(DetailAST aAST)
Tests whether a method definition AST defines an equals covariant. |
static double | parseDouble(String aText, int aType)
Returns the value represented by the specified string of the specified
type. |
static double | parseFloat(String aText, int aType)
Returns the value represented by the specified string of the specified
type. |
static int | parseInt(String aText, int aRadix)
Parses the string argument as a signed integer in the radix specified by
the second argument. |
static long | parseLong(String aText, int aRadix)
Parses the string argument as a signed long in the radix specified by
the second argument. |
FullIdent
for given type node.Parameters: aTypeAST a type node.
Returns: FullIdent
for given type.
Parameters: aNode the root of tree for search.
Returns: sub-node with minimal (line, column) pair.
Parameters: aNode the parameterised AST node
Returns: a list of type parameter names
Parameters: aNode the parameterised AST node
Returns: a list of type parameter names
Parameters: aAST the token to check
Returns: whether it is
Parameters: aAST the method definition AST to test. Precondition: aAST is a TokenTypes.METHOD_DEF node.
Returns: true if aAST defines an equals covariant.
Parameters: aText the string to be parsed. aType the token type of the text. Should be a constant of {@link com.puppycrawl.tools.checkstyle.api.TokenTypes}.
Returns: the double value represented by the string argument.
Parameters: aText the string to be parsed. aType the token type of the text. Should be a constant of {@link com.puppycrawl.tools.checkstyle.api.TokenTypes}.
Returns: the float value represented by the string argument.
Parameters: aText the String containing the integer representation to be parsed. Precondition: aText contains a parsable int. aRadix the radix to be used while parsing aText.
Returns: the integer represented by the string argument in the specified radix.
Parameters: aText the String containing the integer representation to be parsed. Precondition: aText contains a parsable int. aRadix the radix to be used while parsing aText.
Returns: the long represented by the string argument in the specified radix.