org.eclipse.ocl.ecore.impl
Class CollectionLiteralExpImpl

java.lang.Object
  extended by ETypedElementImpl
      extended by org.eclipse.ocl.ecore.impl.OCLExpressionImpl
          extended by org.eclipse.ocl.ecore.impl.LiteralExpImpl
              extended by org.eclipse.ocl.ecore.impl.CollectionLiteralExpImpl
All Implemented Interfaces:
CollectionLiteralExp<EClassifier>, LiteralExp<EClassifier>, OCLExpression<EClassifier>, ASTNode, TypedElement<EClassifier>, Visitable

public class CollectionLiteralExpImpl
extends LiteralExpImpl
implements CollectionLiteralExp

An implementation of the model object 'Collection Literal Exp'.

The following features are implemented:


Field Summary
protected  CollectionKind kind
          The cached value of the 'Kind' attribute
protected static CollectionKind KIND_EDEFAULT
          The default value of the 'Kind' attribute
protected   part
          The cached value of the 'Part' containment reference list
protected static boolean SIMPLE_RANGE_EDEFAULT
          The default value of the 'Simple Range' attribute
 
Fields inherited from class org.eclipse.ocl.ecore.impl.OCLExpressionImpl
END_POSITION_EDEFAULT, endPosition, START_POSITION_EDEFAULT, startPosition
 
Constructor Summary
protected CollectionLiteralExpImpl()
           
 
Method Summary
<T,U extends Visitor<T,?,?,?,?,?,?,?,?,?>>
T
accept(U v)
           
 boolean checkBagKind(DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean checkElementType(DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean checkNoCollectionInstances(DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean checkSequenceKind(DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 boolean checkSetKind(DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 int eBaseStructuralFeatureID(int derivedFeatureID, java.lang.Class<?> baseClass)
           
 int eDerivedStructuralFeatureID(int baseFeatureID, java.lang.Class<?> baseClass)
           
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
protected  EClass eStaticClass()
           
 void eUnset(int featureID)
           
 CollectionKind getKind()
           
  getPart()
           
 boolean isSimpleRange()
           
 void setKind(CollectionKind newKind)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.ecore.impl.OCLExpressionImpl
getEndPosition, getStartPosition, getType, setEndPosition, setStartPosition, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.utilities.TypedElement
getName, getType, setName, setType
 
Methods inherited from interface org.eclipse.ocl.utilities.ASTNode
getEndPosition, getStartPosition, setEndPosition, setStartPosition
 
Methods inherited from interface org.eclipse.ocl.utilities.TypedElement
getName, getType, setName, setType
 
Methods inherited from interface org.eclipse.ocl.utilities.ASTNode
getEndPosition, getStartPosition, setEndPosition, setStartPosition
 
Methods inherited from interface org.eclipse.ocl.expressions.CollectionLiteralExp
checkBagKind, checkElementType, checkNoCollectionInstances, checkSequenceKind, checkSetKind
 
Methods inherited from interface org.eclipse.ocl.utilities.TypedElement
getName, getType, setName, setType
 
Methods inherited from interface org.eclipse.ocl.utilities.ASTNode
getEndPosition, getStartPosition, setEndPosition, setStartPosition
 

Field Detail

KIND_EDEFAULT

protected static final CollectionKind KIND_EDEFAULT
The default value of the 'Kind' attribute.

See Also:
getKind()

kind

protected CollectionKind kind
The cached value of the 'Kind' attribute.

See Also:
getKind()

part

protected  part
The cached value of the 'Part' containment reference list.

See Also:
getPart()

SIMPLE_RANGE_EDEFAULT

protected static final boolean SIMPLE_RANGE_EDEFAULT
The default value of the 'Simple Range' attribute.

See Also:
isSimpleRange(), Constant Field Values
Constructor Detail

CollectionLiteralExpImpl

protected CollectionLiteralExpImpl()

Method Detail

eStaticClass

protected EClass eStaticClass()

Overrides:
eStaticClass in class LiteralExpImpl

getKind

public CollectionKind getKind()

Specified by:
getKind in interface CollectionLiteralExp<EClassifier>
Returns:
the value of the 'Kind' attribute.
See Also:
CollectionKind, CollectionLiteralExp.setKind(CollectionKind), ExpressionsPackage.getCollectionLiteralExp_Kind()

setKind

public void setKind(CollectionKind newKind)

Specified by:
setKind in interface CollectionLiteralExp<EClassifier>
Parameters:
newKind - the new value of the 'Kind' attribute.
See Also:
CollectionKind, CollectionLiteralExp.getKind()

getPart

public  getPart()

Specified by:
getPart in interface CollectionLiteralExp<EClassifier>
Returns:
the value of the 'Part' containment reference list.
See Also:
ExpressionsPackage.getCollectionLiteralExp_Part()

isSimpleRange

public boolean isSimpleRange()

Specified by:
isSimpleRange in interface CollectionLiteralExp<EClassifier>
Returns:
the value of the 'Simple Range' attribute.
See Also:
ExpressionsPackage.getCollectionLiteralExp_SimpleRange()

checkNoCollectionInstances

public boolean checkNoCollectionInstances(DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)


checkSetKind

public boolean checkSetKind(DiagnosticChain diagnostics,
                            java.util.Map<java.lang.Object,java.lang.Object> context)


checkSequenceKind

public boolean checkSequenceKind(DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)


checkBagKind

public boolean checkBagKind(DiagnosticChain diagnostics,
                            java.util.Map<java.lang.Object,java.lang.Object> context)


checkElementType

public boolean checkElementType(DiagnosticChain diagnostics,
                                java.util.Map<java.lang.Object,java.lang.Object> context)


eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        NotificationChain msgs)


eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Overrides:
eGet in class OCLExpressionImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Overrides:
eSet in class OCLExpressionImpl

eUnset

public void eUnset(int featureID)

Overrides:
eUnset in class OCLExpressionImpl

eIsSet

public boolean eIsSet(int featureID)

Overrides:
eIsSet in class OCLExpressionImpl

eBaseStructuralFeatureID

public int eBaseStructuralFeatureID(int derivedFeatureID,
                                    java.lang.Class<?> baseClass)

Overrides:
eBaseStructuralFeatureID in class OCLExpressionImpl

eDerivedStructuralFeatureID

public int eDerivedStructuralFeatureID(int baseFeatureID,
                                       java.lang.Class<?> baseClass)

Overrides:
eDerivedStructuralFeatureID in class OCLExpressionImpl

toString

public java.lang.String toString()

Overrides:
toString in class LiteralExpImpl

accept

public <T,U extends Visitor<T,?,?,?,?,?,?,?,?,?>> T accept(U v)
Description copied from class: OCLExpressionImpl

Specified by:
accept in interface Visitable
Overrides:
accept in class OCLExpressionImpl

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.