|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.cognitive.critics.Critic
org.argouml.cognitive.critics.CompoundCritic
A CompoundCritic acts like a regular critic in that it checks the design and produces design feedback. However, a CompoundCritic is composed of several regular critics that are applied in order. The first one that produces feedback ends the application. This is useful when criticism can be ordered from specific to general: general feedback should not be produced if specific feedback is available. For example, one critic might check for the legality of the name of a design element, and another might check for the presence of any name. If a given design element has no name, both critics could produce feedback, but it would be more useful if only the first one did.
Field Summary | |
private Vector |
critics
The sub-critics that make up this CompoundCritic. |
Fields inherited from class org.argouml.cognitive.critics.Critic |
DEFAULT_CLARIFIER, KT_COMPLETENESS, KT_CONSISTENCY, KT_CORRECTNESS, KT_DESIGNERS, KT_EXPERIENCIAL, KT_OPTIMIZATION, KT_ORGANIZATIONAL, KT_PRESENTATION, KT_SEMANTICS, KT_SYNTAX, KT_TOOL, NO_PROBLEM, PROBLEM_FOUND |
Constructor Summary | |
CompoundCritic()
The constructor of a compound critic. |
|
CompoundCritic(Critic c1,
Critic c2)
The constructor. |
|
CompoundCritic(Critic c1,
Critic c2,
Critic c3)
The constructor. |
|
CompoundCritic(Critic c1,
Critic c2,
Critic c3,
Critic c4)
The constructor. |
Method Summary | |
void |
addCritic(Critic c)
|
void |
addKnowledgeType(String type)
|
void |
addSupportedDecision(Decision d)
|
void |
addSupportedGoal(Goal g)
|
boolean |
containsKnowledgeType(String type)
|
void |
critique(Object dm,
Designer dsgr)
Examine the given Object and Designer and, if appropriate, produce one or more ToDoItem's and add them to the offending design material's and the Designer's ToDoList. |
String |
expand(String desc,
org.tigris.gef.util.VectorSet offs)
Customize the description string just before it is displayed. |
Icon |
getClarifier()
|
Vector |
getCritics()
|
Vector |
getSupportedDecisions()
|
Vector |
getSupportedGoals()
|
boolean |
isActive()
Reply true iff this Critic can execute. |
boolean |
isEnabled()
This is a convient method for accessing one well-known control record. |
void |
removeCritic(Critic c)
|
void |
setCritics(Vector c)
|
boolean |
supports(Decision d)
|
boolean |
supports(Goal g)
|
ToDoItem |
toDoItem(Object dm,
Designer dsgr)
Reply the ToDoItem that the designer should see iff predicate() returns true. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Vector critics
Constructor Detail |
public CompoundCritic()
public CompoundCritic(Critic c1, Critic c2)
c1
- the first critic that makes up the compound criticc2
- the 2nd critic that makes up the compound criticpublic CompoundCritic(Critic c1, Critic c2, Critic c3)
c1
- the first critic that makes up the compound criticc2
- the 2nd critic that makes up the compound criticc3
- the 3rd critic that makes up the compound criticpublic CompoundCritic(Critic c1, Critic c2, Critic c3, Critic c4)
c1
- the first critic that makes up the compound criticc2
- the 2nd critic that makes up the compound criticc3
- the 3rd critic that makes up the compound criticc4
- the 4th critic that makes up the compound criticMethod Detail |
public void setCritics(Vector c)
c
- the new list of critics that completely
replaces the old listpublic Vector getCritics()
public void addCritic(Critic c)
c
- the critic to be added at the end of the current listpublic void removeCritic(Critic c)
c
- the critic to be removedpublic void critique(Object dm, Designer dsgr)
Critic
critique
in class Critic
dm
- the design materialdsgr
- the designerCritic.critique(java.lang.Object,
org.argouml.cognitive.Designer)
public boolean supports(Decision d)
supports
in interface Poster
supports
in class Critic
Poster.supports(org.argouml.cognitive.Decision)
public Vector getSupportedDecisions()
getSupportedDecisions
in interface Poster
getSupportedDecisions
in class Critic
Poster.getSupportedDecisions()
public void addSupportedDecision(Decision d)
addSupportedDecision
in class Critic
d
- the decisionCritic.addSupportedDecision(org.argouml.cognitive.Decision)
public boolean supports(Goal g)
supports
in interface Poster
supports
in class Critic
Poster.supports(org.argouml.cognitive.Goal)
public Vector getSupportedGoals()
getSupportedGoals
in interface Poster
getSupportedGoals
in class Critic
Poster.getSupportedGoals()
public void addSupportedGoal(Goal g)
addSupportedGoal
in class Critic
g
- the goalCritic.addSupportedGoal(org.argouml.cognitive.Goal)
public boolean containsKnowledgeType(String type)
containsKnowledgeType
in interface Poster
containsKnowledgeType
in class Critic
Poster.containsKnowledgeType(java.lang.String)
public void addKnowledgeType(String type)
addKnowledgeType
in class Critic
type
- the knowledgetypeCritic.addKnowledgeType(java.lang.String)
public String expand(String desc, org.tigris.gef.util.VectorSet offs)
Poster
expand
in interface Poster
expand
in class Critic
Poster.expand(java.lang.String,
org.tigris.gef.util.VectorSet)
public Icon getClarifier()
getClarifier
in interface Poster
getClarifier
in class Critic
Poster.getClarifier()
public boolean isActive()
Critic
isActive
in class Critic
Critic.isActive()
public boolean isEnabled()
Critic
isEnabled
in class Critic
Critic.isEnabled()
public ToDoItem toDoItem(Object dm, Designer dsgr)
Critic
toDoItem
in class Critic
Critic.toDoItem(java.lang.Object,
org.argouml.cognitive.Designer)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |