|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectconstraints.InheritanceConstraint
Constraint class for use as correctness or completeness constraint. Enforces single inheritance for Java classes.
Constructor Summary | |
InheritanceConstraint()
|
Method Summary | |
void |
check(AbstractConcept concept)
Checks whether this constraint holds for the given concept. |
protected void |
checkComposite(Composite composite)
Checks whether this constraint holds for the given composite. |
protected void |
checkParents(Concept child,
java.util.Collection parents)
Checks whether the given child concept doesn't inherit from multiple Class form concepts. |
protected java.util.Set |
getParents(CompositeRole parent)
Retrieves all parent concepts given the parent role. |
protected java.util.Set |
getParents(Concept child)
Retrieves all parent concepts given the child concept. |
protected boolean |
isClass(java.lang.String form)
Checks whether the given form can be interpreted as a class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InheritanceConstraint()
Method Detail |
protected boolean isClass(java.lang.String form)
form
- The concept form.
protected void checkParents(Concept child, java.util.Collection parents) throws CoComposeException
child
- the child concept to checkparents
- the parent concepts to check
CoComposeException
- if child inherits from multiple Classesprotected java.util.Set getParents(Concept child)
child
- the child concept
protected java.util.Set getParents(CompositeRole parent)
parent
- the parent role
protected void checkComposite(Composite composite) throws CoComposeException
composite
- The composite to check the constraint for.
CoComposeException
- if and only if the constraint doesn't hold.public void check(AbstractConcept concept) throws CoComposeException
check
in interface Constraint
concept
- The concept to check the constraint for.
CoComposeException
- if and only if the constraint doesn't hold.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |