org.eclipse.ocl.examples.domain.values.impl
Class AbstractTypeValueImpl<T extends DomainType>

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.values.impl.AbstractValue
      extended by org.eclipse.ocl.examples.domain.values.impl.AbstractObjectValue<T>
          extended by org.eclipse.ocl.examples.domain.values.impl.AbstractTypeValueImpl<T>
All Implemented Interfaces:
ElementValue, ObjectValue, TypeValue, Value
Direct Known Subclasses:
ClassifierTypeValueImpl, CollectionTypeValueImpl, EnumerationTypeValueImpl, SimpleTypeValueImpl

public abstract class AbstractTypeValueImpl<T extends DomainType>
extends AbstractObjectValue<T>
implements TypeValue


Field Summary
 
Fields inherited from class org.eclipse.ocl.examples.domain.values.impl.AbstractObjectValue
object
 
Fields inherited from class org.eclipse.ocl.examples.domain.values.impl.AbstractValue
valueFactory
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Constructor Summary
AbstractTypeValueImpl(ValueFactory valueFactory, T type)
           
 
Method Summary
 T asElement()
           
 TypeValue asElementValue()
           
 org.eclipse.emf.ecore.EObject asNavigableObject()
           
 AbstractTypeValueImpl<T> asTypeValue()
           
 boolean equals(java.lang.Object that)
           
 T getElement()
           
 T getInstanceType()
           
 DomainClassifierType getType()
          Return the type of this value determined from its construction context.
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.AbstractObjectValue
asObject, asObjectValue, asValidValue, getObject, hashCode, toString
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.AbstractValue
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asEcoreObject, asInteger, asIntegerValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asUniqueCollectionValue, getActualType, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toIteratorValue, toRealValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.ObjectValue
getObject
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asEcoreObject, asInteger, asIntegerValue, asObject, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asUniqueCollectionValue, asValidValue, getActualType, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toIteratorValue, toRealValue, toString
 

Constructor Detail

AbstractTypeValueImpl

public AbstractTypeValueImpl(ValueFactory valueFactory,
                             T type)
Method Detail

asElement

public T asElement()
Specified by:
asElement in interface Value
Overrides:
asElement in class AbstractValue

asElementValue

public TypeValue asElementValue()
Specified by:
asElementValue in interface Value
Overrides:
asElementValue in class AbstractValue

asNavigableObject

public org.eclipse.emf.ecore.EObject asNavigableObject()
                                                throws InvalidValueException
Specified by:
asNavigableObject in interface Value
Overrides:
asNavigableObject in class AbstractValue
Throws:
InvalidValueException

asTypeValue

public AbstractTypeValueImpl<T> asTypeValue()
Specified by:
asTypeValue in interface Value
Overrides:
asTypeValue in class AbstractValue

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class AbstractObjectValue<T extends DomainType>

getElement

public T getElement()
Specified by:
getElement in interface ElementValue

getInstanceType

public T getInstanceType()
Specified by:
getInstanceType in interface TypeValue

getType

public DomainClassifierType getType()
Description copied from interface: Value
Return the type of this value determined from its construction context. In the case of collections this may differ from the actual type.

Specified by:
getType in interface Value