org.designwizard.designrules
Class AbstractDependencesRule

java.lang.Object
  extended by org.designwizard.designrules.AbstractDependencesRule
All Implemented Interfaces:
DependencesRuleIF, Rule
Direct Known Subclasses:
ClassDependencesRule, MethodDependencesRule, PackageDependences

public abstract class AbstractDependencesRule
extends java.lang.Object
implements DependencesRuleIF


Field Summary
protected  java.util.Set<java.lang.String> allowed
           
protected  DesignWizard dw
           
protected  java.lang.String entity
           
protected  java.lang.String report
           
protected  java.util.List<java.lang.String> violations
           
 
Constructor Summary
protected AbstractDependencesRule(java.lang.String entity, DesignWizard dw)
           
 
Method Summary
 void addAllowedEntities(java.lang.String... entities)
           
 void addDeniedEntities(java.lang.String... entities)
           
abstract  boolean checkRule()
          This method checks whether the code are in conformance with the rule or not.
 java.lang.String getReport()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entity

protected java.lang.String entity

violations

protected java.util.List<java.lang.String> violations

allowed

protected java.util.Set<java.lang.String> allowed

dw

protected DesignWizard dw

report

protected java.lang.String report
Constructor Detail

AbstractDependencesRule

protected AbstractDependencesRule(java.lang.String entity,
                                  DesignWizard dw)
Method Detail

addAllowedEntities

public void addAllowedEntities(java.lang.String... entities)
Specified by:
addAllowedEntities in interface DependencesRuleIF

addDeniedEntities

public void addDeniedEntities(java.lang.String... entities)
Specified by:
addDeniedEntities in interface DependencesRuleIF

getReport

public java.lang.String getReport()
Specified by:
getReport in interface Rule

checkRule

public abstract boolean checkRule()
                           throws InexistentEntityException
Description copied from interface: Rule
This method checks whether the code are in conformance with the rule or not.

Specified by:
checkRule in interface Rule
Returns:
true if the code is in conformance with the rule; false otherwise.
Throws:
InexistentEntityException