|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.puppycrawl.tools.checkstyle.checks.CheckUtils
public final class CheckUtils
Contains utility methods for the checks.
| 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<String> |
getTypeParameterNames(DetailAST aNode)
Retrieves the names of the type parameters to the node. |
static List<DetailAST> |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isEqualsMethod(DetailAST aAST)
aAST - the method definition AST to test.
Precondition: aAST is a TokenTypes.METHOD_DEF node.
public static boolean isElseIf(DetailAST aAST)
aAST - the token to check
public static FullIdent createFullType(DetailAST aTypeAST)
FullIdent for given type node.
aTypeAST - a type node.
FullIdent for given type.
public static double parseDouble(String aText,
int aType)
aText - the string to be parsed.aType - the token type of the text. Should be a constant of
TokenTypes.
public static int parseInt(String aText,
int aRadix)
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.
public static long parseLong(String aText,
int aRadix)
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.
public static double parseFloat(String aText,
int aType)
aText - the string to be parsed.aType - the token type of the text. Should be a constant of
TokenTypes.
public static DetailAST getFirstNode(DetailAST aNode)
aNode - the root of tree for search.
public static List<String> getTypeParameterNames(DetailAST aNode)
aNode - the parameterised AST node
public static List<DetailAST> getTypeParameters(DetailAST aNode)
aNode - the parameterised AST node
|
Back to the Checkstyle Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||