public class TestInterface
extends java.lang.Object
| Constructor and Description |
|---|
TestInterface(java.lang.String ModelClass,
java.lang.String ClassToCheck)
Constructor setting classes to compare, setting default penalty
|
TestInterface(java.lang.String ModelClass,
java.lang.String ClassToCheck,
java.lang.String firstPenalty,
java.lang.String eachPenalty)
Constructor setting classes to compare and penalty
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkHeritage(java.lang.String baseClass)
Checks if it extends the class given and adds a new failure if exists to
the result The superclass of the ClassToCheck can be a subclass of the
superclass given
|
void |
checkHeritageStrict(java.lang.String baseClass)
Checks if it extends the class given and adds a new failure if exists to
the result The superclass of the ClassToCheck has to be the same as the
superclass given
|
void |
checkImplements(java.lang.String... interfacesModel)
Checks if the given interfaces are implemented and adds a new failure if
exists to the result
|
Result |
getResult() |
void |
setLanguage(InterfaceCheckerI18n lang) |
void |
setResult(Result result) |
void |
showResult() |
void |
testInterfaceFromModel()
Compares both classes and adds a new failure if exists to the result.
|
void |
testInterfaceFromModel(boolean allowAddPublic)
Compares both classes and adds a new failure if exists to the result.
|
void |
testInterfaceFromModel(boolean allowAddPublic,
boolean restrictNoPublic)
Compares both classes and adds a new failure if exists to the result
|
public TestInterface(java.lang.String ModelClass,
java.lang.String ClassToCheck,
java.lang.String firstPenalty,
java.lang.String eachPenalty)
ModelClass - Class you want to be a model for the comparisonClassToCheck - Class you want to check and compare with the modelfirstPenalty - Penalty applied the first time the fails occurredeachPenalty - Penalty applied when the fails occurred after the first timepublic TestInterface(java.lang.String ModelClass,
java.lang.String ClassToCheck)
ModelClass - Class you want to be a model for the comparisonClassToCheck - Class you want to check and compare with the modelpublic void setLanguage(InterfaceCheckerI18n lang)
public void setResult(Result result)
public void testInterfaceFromModel()
public void testInterfaceFromModel(boolean allowAddPublic)
allowAddPublic - If this parameter is set true, you allow the ClassToCheck to
have extra public elementspublic void testInterfaceFromModel(boolean allowAddPublic,
boolean restrictNoPublic)
allowAddPublic - If this parameter is set true, you allow the ClassToCheck to
have extra public elementsrestrictNoPublic - If this parameter is set true, you don't allow the
ClassToCheck to have extra no public elementspublic void checkHeritage(java.lang.String baseClass)
baseClass - the name of the base class that must be usedpublic void checkHeritageStrict(java.lang.String baseClass)
baseClass - the name of the base class that must be usedpublic void checkImplements(java.lang.String... interfacesModel)
interfacesModel - the names of the interfaces that must be implementedpublic Result getResult()
public void showResult()