com.puppycrawl.tools.checkstyle.checks.j2ee
public class Utils extends Object
Method Summary | |
---|---|
static 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, String aClassOrInterface)
Determines whether an AST node declares an extension of a class or
interface. |
static boolean | hasImplements(DetailAST aAST, 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, String aName)
Determines whether an AST node has a definition of a public method. |
static boolean | hasPublicMethod(DetailAST aAST, String aName, boolean aIsVoid)
Determines whether an AST node has a definition of a public method. |
static boolean | hasPublicMethod(DetailAST aAST, String aName, boolean aIsVoid, int aParameterCount)
Determines whether an AST node has a definition of a public method. |
static boolean | hasThrows(DetailAST aAST, 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, String aName, boolean aIsVoid, int aParameterCount)
Determines whether an AST node defines a public method. |
static boolean | isPublicMethod(DetailAST aAST, String aName, boolean aIsVoid)
Determines whether an AST node defines a public method. |
static boolean | isPublicMethod(DetailAST aAST, String aName)
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. |
Parameters: aAST the AST containing the entire hierarcy of the object
Returns: the dotted name String representation of the object contained within aAST.
Parameters: aTypeAST1 the first type AST to test. aTypeAST2 the second type AST to test.
Returns: true if aTypeAST1 and aTypeAST2 have the same type.
Parameters: aAST the AST to check. aClassOrInterface the class or interface to check.
Returns: if the class defined by aAST implements declares an extension of aClassOrInterface.
Parameters: aAST the AST to check. aInterface the interface to check.
Returns: if the class defined by aAST implements declares an implementation of aInterface.
Parameters: aAST the AST to check. aParameterCount the number of parameters
Returns: true if aAST defines a class with a public constructor with aParameterCount parameters.
Parameters: aAST the node to check. Normally aAST is a CLASS_DEF. aName the name of the method.
Returns: true if aAST has a definition of a public method with name aName.
Parameters: aAST the node to check. Normally aAST is a CLASS_DEF. aName the name of the method. aIsVoid designates whether the method is void.
Returns: true if aAST has a definition of a public method with name aName and that is void according to aIsVoid.
Parameters: 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.
Returns: true if aAST has a definition of a public method with name aName and that is void according to aIsVoid.
Parameters: aAST the AST to check. aException the name of the Exception to check.
Returns: if the class defined by aAST implements declares a throw of aException.
Parameters: aAST the AST to check.
Returns: true if aAST is in the definition of a class that implements javax.ejb.SessionBean.
Parameters: aAST the AST to check.
Returns: true if aAST is in the definition of a class that implements javax.ejb.SessionBean.
Parameters: aAST the AST to check.
Returns: true if aAST defines an abstract element.
Parameters: aAST the AST to check.
Returns: true if aAST defines a final element.
Parameters: aAST the AST to check.
Returns: true if aAST is in the definition of a an EJB class.
Parameters: aAST the AST to check.
Returns: true if aAST defines a public element.
Parameters: 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.
Returns: true if aAST is the definition of a public method with name aName and that is void according to aIsVoid.
Parameters: aAST the node to check. Normally aAST is a METHOD_DEF. aName the name of the method. aIsVoid designates whether the method is void.
Returns: true if aAST is the definition of a public method with name aName and that is void according to aIsVoid.
Parameters: aAST the node to check. Normally aAST is a METHOD_DEF. aName the name of the method.
Returns: true if aAST is the definition of a public method with name aName and that is void according to aIsVoid.
Parameters: aAST the AST to check.
Returns: true if aAST defines a static element.
Parameters: aAST the AST to check.
Returns: true if aAST defines a void method.
Parameters: aMethodAST1 the first method AST to test. aMethodAST2 the second method AST to test.
Returns: true if aMethodAST1 and aMethodAST2 have the same parameter lists.