krieger.oclsolve
Class PropertyFactory<CID>

java.lang.Object
  extended by krieger.oclsolve.PropertyFactory<CID>
Type Parameters:
CID - The type used for identifying classes.

public class PropertyFactory<CID>
extends java.lang.Object

Represents a factory for (UML) properties.


Constructor Summary
PropertyFactory(ClassifierFactory<CID> classifierFactory)
          Creates a PropertyFactory from a ClassifierFactory.
 
Method Summary
 java.util.List<Property> createAssociation(CID class1, Multiplicity mult1, CID class2, Multiplicity mult2, boolean atPre, boolean constant)
          Returns an new association.
 Property createAttribute(CID owningClass, Classifier<?> type, boolean atPre, boolean constant)
          Returns an new attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyFactory

public PropertyFactory(ClassifierFactory<CID> classifierFactory)
Creates a PropertyFactory from a ClassifierFactory.

Method Detail

createAttribute

public Property createAttribute(CID owningClass,
                                Classifier<?> type,
                                boolean atPre,
                                boolean constant)
Returns an new attribute.

Parameters:
atPre - Whether the attribute holds values in the pre-state (rather than the post-state).
constant - Whether the attribute can be changed by constraint solving.

createAssociation

public java.util.List<Property> createAssociation(CID class1,
                                                  Multiplicity mult1,
                                                  CID class2,
                                                  Multiplicity mult2,
                                                  boolean atPre,
                                                  boolean constant)
Returns an new association.

Parameters:
atPre - Whether the association holds values in the pre-state (rather than the post-state).
constant - Whether the association can be changed by constraint solving.
Returns:
A list holding the association ends.