public abstract class MethodChecker extends Object
Constructor and Description |
---|
MethodChecker(AbstractJ2eeCheck aCheck)
Constructs a
MethodChecker . |
Modifier and Type | Method and Description |
---|---|
abstract void |
checkMethod(DetailAST aMethodAST)
Checks whether a method satisfies component requirements.
|
void |
checkMethod(DetailAST aMethodAST,
boolean aAllowFinal)
Checks whether a method satisfies public, non-static, and final
requirements.
|
void |
checkMethods(DetailAST aAST)
Checks that the methods of a component satisfy requirements.
|
protected void |
checkNotThrows(DetailAST aMethodAST,
String aException)
Checks that the throws clause of a method definition does no include an
Exception.
|
protected void |
checkThrows(DetailAST aMethodAST,
String aException)
Checks that the throws clause of a method definition includes an
Exception.
|
protected AbstractJ2eeCheck |
getCheck()
Gets the client Check.
|
protected void |
log(DetailAST aMethodAST,
String aKey,
Object[] aArgs)
Logs an error message for a method.
|
protected void |
logName(DetailAST aMethodAST,
String aKey,
Object[] aArgs)
Logs an error message for a method, including the method name.
|
public MethodChecker(AbstractJ2eeCheck aCheck)
MethodChecker
.aCheck
- the client Check.protected AbstractJ2eeCheck getCheck()
public void checkMethods(DetailAST aAST)
aAST
- the AST for the component definition.public abstract void checkMethod(DetailAST aMethodAST)
aMethodAST
- the AST for the method definition.public void checkMethod(DetailAST aMethodAST, boolean aAllowFinal)
aMethodAST
- AST for the method definition.aAllowFinal
- true if the method may be final.protected void checkThrows(DetailAST aMethodAST, String aException)
aMethodAST
- the AST for the method definition.aException
- the name of the Exception to check.protected void checkNotThrows(DetailAST aMethodAST, String aException)
aMethodAST
- the AST for the method definition.aException
- the name of the Exception to check.protected void log(DetailAST aMethodAST, String aKey, Object[] aArgs)
aMethodAST
- the AST for the method definition.aKey
- key for message.aArgs
- message arguments.