org.eclipse.ocl.examples.pivot.ecore
Class EObjectProperty

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.library.AbstractFeature
      extended by org.eclipse.ocl.examples.domain.library.AbstractProperty
          extended by org.eclipse.ocl.examples.pivot.ecore.EObjectProperty
All Implemented Interfaces:
LibraryFeature, LibraryProperty

public class EObjectProperty
extends AbstractProperty

An EObjectProperty provides the standard LibraryProperty to implement a PropertyCallExp. When constructed with a null specification, the call just accesses the property field in a source object. When constructed with a non-null specification, the specification defines the access algorithm, which if provided as an OpaqueExpression is lazily compiled from OCL source text.


Field Summary
protected  org.eclipse.emf.ecore.EStructuralFeature eFeature
           
protected  ValueSpecification specification
           
 
Constructor Summary
EObjectProperty(org.eclipse.emf.ecore.EStructuralFeature eFeature, ValueSpecification specification)
           
 
Method Summary
 Value evaluate(DomainEvaluator evaluator, DomainType returnType, Value sourceValue, DomainProperty property)
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.library.AbstractFeature
getLibraryValidator, getValidator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.library.LibraryFeature
getValidator
 

Field Detail

eFeature

protected final org.eclipse.emf.ecore.EStructuralFeature eFeature

specification

protected ValueSpecification specification
Constructor Detail

EObjectProperty

public EObjectProperty(org.eclipse.emf.ecore.EStructuralFeature eFeature,
                       ValueSpecification specification)
Method Detail

evaluate

public Value evaluate(DomainEvaluator evaluator,
                      DomainType returnType,
                      Value sourceValue,
                      DomainProperty property)
               throws InvalidValueException
Throws:
InvalidValueException