|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.puppycrawl.tools.checkstyle.checks.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 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(java.lang.String aText,
int aType)
Returns the value represented by the specified string of the specified type. |
static double |
parseFloat(java.lang.String aText,
int aType)
Returns the value represented by the specified string of the specified type. |
static int |
parseInt(java.lang.String aText,
int aRadix)
Parses the string argument as a signed integer in the radix specified by the second argument. |
static long |
parseLong(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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.
|
Back to the Checkstyle Home Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |