constructDottedName
public static String constructDottedName(DetailAST aAST)
Builds the dotted name String representation of the object contained
within an AST.
aAST
- the AST containing the entire hierarcy of the object
- the dotted name String representation of the object contained
within aAST.
equalTypes
public static boolean equalTypes(DetailAST aTypeAST1,
DetailAST aTypeAST2)
Tests whether two type AST nodes have the same type.
aTypeAST1
- the first type AST to test.aTypeAST2
- the second type AST to test.
- true if aTypeAST1 and aTypeAST2 have the same type.
hasExtends
public static boolean hasExtends(DetailAST aAST,
String aClassOrInterface)
Determines whether an AST node declares an extension of a class or
interface.
aAST
- the AST to check.aClassOrInterface
- the class or interface to check.
- if the class defined by aAST implements declares an
extension of aClassOrInterface.
hasImplements
public static boolean hasImplements(DetailAST aAST,
String aInterface)
Determines whether an AST node declares an implementation of an
interface.
aAST
- the AST to check.aInterface
- the interface to check.
- if the class defined by aAST implements declares an
implementation of aInterface.
hasPublicConstructor
public static boolean hasPublicConstructor(DetailAST aAST,
int aParameterCount)
Determines whether an AST defines a class with a public constructor
with a given number of parameters.
aAST
- the AST to check.aParameterCount
- the number of parameters
- true if aAST defines a class with a public constructor
with aParameterCount parameters.
hasPublicMethod
public static boolean hasPublicMethod(DetailAST aAST,
String aName)
Determines whether an AST node has a definition of a public method.
aAST
- the node to check. Normally aAST is a CLASS_DEF.aName
- the name of the method.
- true if aAST has a definition of a public method with name
aName.
hasPublicMethod
public static boolean hasPublicMethod(DetailAST aAST,
String aName,
boolean aIsVoid)
Determines whether an AST node has a definition of a public method.
aAST
- the node to check. Normally aAST is a CLASS_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.
- true if aAST has a definition of a public method with name
aName and that is void according to aIsVoid.
hasPublicMethod
public static boolean hasPublicMethod(DetailAST aAST,
String aName,
boolean aIsVoid,
int aParameterCount)
Determines whether an AST node has a definition of a public method.
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.
- true if aAST has a definition of a public method with name
aName and that is void according to aIsVoid.
hasThrows
public static boolean hasThrows(DetailAST aAST,
String aException)
Determines whether an AST node declares a throw of an Exception.
aAST
- the AST to check.aException
- the name of the Exception to check.
- if the class defined by aAST implements declares a throw
of aException.
implementsEntityBean
public static boolean implementsEntityBean(DetailAST aAST)
Determines whether an AST node is in the definition of a
class that implements javax.ejb.EntityBean.
- true if aAST is in the definition of a
class that implements javax.ejb.SessionBean.
implementsSessionBean
public static boolean implementsSessionBean(DetailAST aAST)
Determines whether an AST node is in the definition of a
class that implements javax.ejb.SessionBean.
- true if aAST is in the definition of a
class that implements javax.ejb.SessionBean.
isAbstract
public static boolean isAbstract(DetailAST aAST)
Determines whether an AST defines an abstract element.
- true if aAST defines an abstract element.
isFinal
public static boolean isFinal(DetailAST aAST)
Determines whether an AST defines a final element.
- true if aAST defines a final element.
isInEJB
public static boolean isInEJB(DetailAST aAST)
Determines whether an AST node is in the definition of an
EJB class.
- true if aAST is in the definition of a
an EJB class.
isPublic
public static boolean isPublic(DetailAST aAST)
Determines whether an AST defines a public element.
- true if aAST defines a public element.
isPublicMethod
public static boolean isPublicMethod(DetailAST aAST,
String aName)
Determines whether an AST node defines a public method.
aAST
- the node to check. Normally aAST is a METHOD_DEF.aName
- the name of the method.
- true if aAST is the definition of a public method with name
aName and that is void according to aIsVoid.
isPublicMethod
public static boolean isPublicMethod(DetailAST aAST,
String aName,
boolean aIsVoid)
Determines whether an AST node defines a public method.
aAST
- the node to check. Normally aAST is a METHOD_DEF.aName
- the name of the method.aIsVoid
- designates whether the method is void.
- true if aAST is the definition of a public method with name
aName and that is void according to aIsVoid.
isPublicMethod
public static boolean isPublicMethod(DetailAST aAST,
String aName,
boolean aIsVoid,
int aParameterCount)
Determines whether an AST node defines a public method.
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.
- true if aAST is the definition of a public method with name
aName and that is void according to aIsVoid.
isStatic
public static boolean isStatic(DetailAST aAST)
Determines whether an AST defines a static element.
- true if aAST defines a static element.
isVoid
public static boolean isVoid(DetailAST aAST)
Determines whether an AST defines a void method.
- true if aAST defines a void method.
sameParameters
public static boolean sameParameters(DetailAST aMethodAST1,
DetailAST aMethodAST2)
Tests whether two method definition ASTs have the same parameter lists
according to type.
aMethodAST1
- the first method AST to test.aMethodAST2
- the second method AST to test.
- true if aMethodAST1 and aMethodAST2 have the same
parameter lists.