public final class CheckUtils extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
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 checkpublic 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 nodeCopyright © 2001–2014. All rights reserved.