|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
kieker.checkstyle.AnalysisComponentConstructorCheck
public class AnalysisComponentConstructorCheck
This is an additional checkstyle check which makes sure that all analysis components supply the default constructor (using a Configuration and an
IProjectContext object) we need for the framework.
Keep in mind that the check is not perfect, as checkstyle has some limitations. The main drawback is that we cannot check types. We can therefore not recognize
whether a class inherits directly or indirectly from AbstractAnalysisComponent. Instead we use the annotations
Plugin and Repository to check whether a class is an analysis component or not. This can lead to false positives. Furthermore we cannot check the
types of the parameters for the constructors either. We use the names of the types to check this. This can lead to false positives as well.
The check provides a property to ignore abstract classes.
| Constructor Summary | |
|---|---|
AnalysisComponentConstructorCheck()
Creates a new instance of this class. |
|
| Method Summary | |
|---|---|
int[] |
getDefaultTokens()
|
void |
setIgnoreAbstractClasses(boolean ignoreAbstractClasses)
Setter for the property ignoreAbstractClasses. |
void |
visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
|
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
|---|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
|---|
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity |
| Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
|---|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnalysisComponentConstructorCheck()
| Method Detail |
|---|
public int[] getDefaultTokens()
getDefaultTokens in class com.puppycrawl.tools.checkstyle.api.Checkpublic void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitToken in class com.puppycrawl.tools.checkstyle.api.Checkpublic void setIgnoreAbstractClasses(boolean ignoreAbstractClasses)
ignoreAbstractClasses.
ignoreAbstractClasses - The new value of the property.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||