public class AstModel extends AstConcreteClafer
The Clafer model. Also acts as the implicit "root" Clafer which nests above the top most Clafers.
For example:
abstract Feature Cost -> integer Database : FeatureAlthough the model is written syntactically like above, its representation internally is more like:
#root# abstract Feature Cost -> integer Database : Feature
#root#
is represented by this class.
claferClafer
Modifier and Type | Method and Description |
---|---|
AstAbstractClafer |
addAbstract(String name)
Add a new abstract Clafer to the model.
|
AstModel |
extending(AstAbstractClafer superClafer)
Set the supertype of this Clafer.
|
List<AstAbstractClafer> |
getAbstracts()
Returns all the abstract Clafers
|
AstAbstractClafer |
getTypeHierarchyRoot()
Returns the type every non-primitive type extends from.
|
AstModel |
refTo(AstClafer targetType)
Set this Clafer's reference to target type.
|
AstModel |
refToUnique(AstClafer targetType)
Set this Clafer's reference to target type along with a uniqueness
constraint.
|
AstConcreteClafer |
withCard(Card card)
Set this Clafer's cardinality.
|
AstModel |
withGroupCard(Card groupCard)
Set this Clafer's group cardinality.
|
getCard, getParent, hasParent, withCard, withCard, withGroupCard, withGroupCard
addChild, addConstraint, equals, getChildren, getConstraints, getGroupCard, getName, getRef, getSuperClafer, hasChildren, hasConstraints, hashCode, hasRef, hasSuperClafer, toString
public AstAbstractClafer getTypeHierarchyRoot()
public List<AstAbstractClafer> getAbstracts()
public AstAbstractClafer addAbstract(String name)
name
- the name of the abtract Claferpublic AstModel extending(AstAbstractClafer superClafer)
AstConcreteClafer
extending
in class AstConcreteClafer
superClafer
- the supertypepublic AstModel refTo(AstClafer targetType)
AstConcreteClafer
refTo
in class AstConcreteClafer
targetType
- the type to refer topublic AstModel refToUnique(AstClafer targetType)
AstConcreteClafer
refToUnique
in class AstConcreteClafer
targetType
- the type to refer topublic AstConcreteClafer withCard(Card card)
AstConcreteClafer
withCard
in class AstConcreteClafer
card
- the cardinalitypublic AstModel withGroupCard(Card groupCard)
AstConcreteClafer
withGroupCard
in class AstConcreteClafer
groupCard
- the group cardinalityCopyright © 2013. All Rights Reserved.