|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.seventytwomiles.architecturerules.domain.Rule
public class Rule
Represents a Rule that may not be violoated.
| Constructor Summary | |
|---|---|
Rule()
Constructs a new Rule. |
|
Rule(java.lang.String id)
Instanciates a new Rule with the given id. |
|
Rule(java.lang.String id,
java.lang.String packageName)
Instanciates a new Rule with the given id. |
|
| Method Summary | |
|---|---|
boolean |
addPackage(java.lang.String packageName)
|
boolean |
addViolation(java.lang.String violation)
Add a new violation to this Rule.
|
java.lang.String |
describe()
Describes the properties of this rule in an xml-like format. |
java.lang.String |
describePackges()
|
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getComment()
Getter for property comment.
|
java.lang.String |
getDescriptionOfRule()
|
java.lang.String |
getId()
Getter for property id.
|
java.util.Collection |
getPackages()
Getter for property packages
|
java.util.Collection |
getViolations()
Get all of the violations. |
int |
hashCode()
|
boolean |
removeViolation(java.lang.String violation)
Remove a violation from this Rule. |
void |
setComment(java.lang.String comment)
Setter for property comment.
|
void |
setId(java.lang.String id)
Setter for property id.
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait,
wait, wait |
| Constructor Detail |
|---|
public Rule()
Constructs a new Rule.
public Rule(java.lang.String id)
Instanciates a new Rule with the given id.
id - sets the id
public Rule(java.lang.String id,
java.lang.String packageName)
Instanciates a new Rule with the given id.
This constructor is to provide some sense of backwards compatability with the releases in series 1 (1.0 and 1.1)
id - sets the id
packageName - a @packages to assert
on.
| Method Detail |
|---|
public java.lang.String getId()
Getter for property id.
public java.lang.String getComment()
Getter for property comment.
public void setComment(java.lang.String comment)
Setter for property comment.
comment - Value to set for property
comment.
public java.util.Collection getPackages()
Getter for property packages
public boolean addPackage(java.lang.String packageName)
packageName - String
public boolean removeViolation(java.lang.String violation)
Remove a violation from this Rule.
violation - String a package this this Rule's
package should not
test on
public boolean addViolation(java.lang.String violation)
Add a new violation to this Rule.
violation - String a package this this Rule's
package may NOT depend
upon
public java.util.Collection getViolations()
Get all of the violations.
Note: this Collection is unmodifiable, use addViolation(java.lang.String)
and
removeViolation(java.lang.String)
java.lang.UnsupportedOperationException - when
getViolations.add(Object)
or getViolations.remove(Object) is called. Use addViolation(java.lang.String)
and removeViolation(java.lang.String).
public void setId(java.lang.String id)
Setter for property id.
id - Value to set for property id.
public boolean equals(java.lang.Object object)
equals in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode in class java.lang.Object
Object.hashCode()
public java.lang.String describe()
Describes the properties of this rule in an xml-like format.
Rule.
public java.lang.String getDescriptionOfRule()
public java.lang.String describePackges()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||