|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.puppycrawl.tools.checkstyle.checks.j2ee.Utils
J2EE check utility methods.
Constructor Summary | |
Utils()
|
Method Summary | |
static java.lang.String |
constructDottedName(DetailAST aAST)
Builds the dotted name String representation of the object contained within an AST. |
static boolean |
equalTypes(DetailAST aTypeAST1,
DetailAST aTypeAST2)
Tests whether two type AST nodes have the same type. |
static boolean |
hasExtends(DetailAST aAST,
java.lang.String aClassOrInterface)
Determines whether an AST node declares an extension of a class or interface. |
static boolean |
hasImplements(DetailAST aAST,
java.lang.String aInterface)
Determines whether an AST node declares an implementation of an interface. |
static boolean |
hasPublicConstructor(DetailAST aAST,
int aParameterCount)
Determines whether an AST defines a class with a public constructor with a given number of parameters. |
static boolean |
hasPublicMethod(DetailAST aAST,
java.lang.String aName)
Determines whether an AST node has a definition of a public method. |
static boolean |
hasPublicMethod(DetailAST aAST,
java.lang.String aName,
boolean aIsVoid)
Determines whether an AST node has a definition of a public method. |
static boolean |
hasPublicMethod(DetailAST aAST,
java.lang.String aName,
boolean aIsVoid,
int aParameterCount)
Determines whether an AST node has a definition of a public method. |
static boolean |
hasThrows(DetailAST aAST,
java.lang.String aException)
Determines whether an AST node declares a throw of an Exception. |
static boolean |
implementsEntityBean(DetailAST aAST)
Determines whether an AST node is in the definition of a class that implements javax.ejb.EntityBean. |
static boolean |
implementsSessionBean(DetailAST aAST)
Determines whether an AST node is in the definition of a class that implements javax.ejb.SessionBean. |
static boolean |
isAbstract(DetailAST aAST)
Determines whether an AST defines an abstract element. |
static boolean |
isFinal(DetailAST aAST)
Determines whether an AST defines a final element. |
static boolean |
isInEJB(DetailAST aAST)
Determines whether an AST node is in the definition of an EJB class. |
static boolean |
isPublic(DetailAST aAST)
Determines whether an AST defines a public element. |
static boolean |
isPublicMethod(DetailAST aAST,
java.lang.String aName)
Determines whether an AST node defines a public method. |
static boolean |
isPublicMethod(DetailAST aAST,
java.lang.String aName,
boolean aIsVoid)
Determines whether an AST node defines a public method. |
static boolean |
isPublicMethod(DetailAST aAST,
java.lang.String aName,
boolean aIsVoid,
int aParameterCount)
Determines whether an AST node defines a public method. |
static boolean |
isStatic(DetailAST aAST)
Determines whether an AST defines a static element. |
static boolean |
isVoid(DetailAST aAST)
Determines whether an AST defines a void method. |
static boolean |
sameParameters(DetailAST aMethodAST1,
DetailAST aMethodAST2)
Tests whether two method definition ASTs have the same parameter lists according to type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static boolean hasPublicMethod(DetailAST aAST, java.lang.String aName)
aAST
- the node to check. Normally aAST is a CLASS_DEF.aName
- the name of the method.
public static boolean hasPublicMethod(DetailAST aAST, java.lang.String aName, boolean aIsVoid)
aAST
- the node to check. Normally aAST is a CLASS_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.
public static boolean hasPublicMethod(DetailAST aAST, java.lang.String aName, boolean aIsVoid, int aParameterCount)
aAST
- the node to check. Normally aAST is a CLASS_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.aParameterCount
- the number of method parameters.
public static boolean hasPublicConstructor(DetailAST aAST, int aParameterCount)
aAST
- the AST to check.aParameterCount
- the number of parameters
public static boolean implementsEntityBean(DetailAST aAST)
aAST
- the AST to check.
public static boolean implementsSessionBean(DetailAST aAST)
aAST
- the AST to check.
public static boolean isInEJB(DetailAST aAST)
aAST
- the AST to check.
public static boolean isAbstract(DetailAST aAST)
aAST
- the AST to check.
public static boolean isFinal(DetailAST aAST)
aAST
- the AST to check.
public static boolean isPublic(DetailAST aAST)
aAST
- the AST to check.
public static boolean isStatic(DetailAST aAST)
aAST
- the AST to check.
public static boolean isVoid(DetailAST aAST)
aAST
- the AST to check.
public static boolean hasImplements(DetailAST aAST, java.lang.String aInterface)
aAST
- the AST to check.aInterface
- the interface to check.
public static boolean hasExtends(DetailAST aAST, java.lang.String aClassOrInterface)
aAST
- the AST to check.aClassOrInterface
- the class or interface to check.
public static boolean hasThrows(DetailAST aAST, java.lang.String aException)
aAST
- the AST to check.aException
- the name of the Exception to check.
public static boolean isPublicMethod(DetailAST aAST, java.lang.String aName, boolean aIsVoid, int aParameterCount)
aAST
- the node to check. Normally aAST is a METHOD_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.aParameterCount
- the number of method parameters.
public static boolean isPublicMethod(DetailAST aAST, java.lang.String aName, boolean aIsVoid)
aAST
- the node to check. Normally aAST is a METHOD_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.
public static boolean isPublicMethod(DetailAST aAST, java.lang.String aName)
aAST
- the node to check. Normally aAST is a METHOD_DEF.aName
- the name of the method.
public static java.lang.String constructDottedName(DetailAST aAST)
aAST
- the AST containing the entire hierarcy of the object
public static boolean sameParameters(DetailAST aMethodAST1, DetailAST aMethodAST2)
aMethodAST1
- the first method AST to test.aMethodAST2
- the second method AST to test.
public static boolean equalTypes(DetailAST aTypeAST1, DetailAST aTypeAST2)
aTypeAST1
- the first type AST to test.aTypeAST2
- the second type AST to test.
|
Back to the Checkstyle Home Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |