org.eclipse.emf.query.conditions.eobjects.structuralfeatures
Class EStructuralFeatureValueGetter

java.lang.Object
  extended by org.eclipse.emf.query.conditions.eobjects.structuralfeatures.EStructuralFeatureValueGetter
All Implemented Interfaces:
IEStructuralFeatureValueGetter

public class EStructuralFeatureValueGetter
extends Object
implements IEStructuralFeatureValueGetter

A default implementation of the IEStructuralFeatureValueGetter interface. It behaves as though the argument eObject passed to it require no preparation or modification before or after invoking its methods and therefore it accesses the methods of the argument eObject passed to it directly.


Constructor Summary
EStructuralFeatureValueGetter()
          Deprecated. Use the singleton provided by getInstance().
 
Method Summary
 List<EObject> eContents(EObject eObject, EObjectCondition filterCondition)
          Extract the contained EObjects of the argument eObject. and return them as a list.
 Object eGet(EObject eObject, EStructuralFeature eFeature, boolean resolve)
          An EStructuralFeature's value getter.
static IEStructuralFeatureValueGetter getInstance()
           
 EObject resolve(EObject eObject)
          Does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EStructuralFeatureValueGetter

@Deprecated
public EStructuralFeatureValueGetter()
Deprecated. Use the singleton provided by getInstance().

Method Detail

getInstance

public static IEStructuralFeatureValueGetter getInstance()

eContents

public List<EObject> eContents(EObject eObject,
                               EObjectCondition filterCondition)
Description copied from interface: IEStructuralFeatureValueGetter
Extract the contained EObjects of the argument eObject. and return them as a list. It uses an -optional- EObjectCondition as a filtering condition of the content list where only those children EObjects that satisfy the filterCondition will be returned to the caller

Specified by:
eContents in interface IEStructuralFeatureValueGetter
Parameters:
eObject - The EObject to extract children from
filterCondition - The EObjectCondition to apply on the children in order to remove out those that don't satisfy it. It could be null.
Returns:
List The list of children of the argument eObject.

eGet

public Object eGet(EObject eObject,
                   EStructuralFeature eFeature,
                   boolean resolve)
Description copied from interface: IEStructuralFeatureValueGetter
An EStructuralFeature's value getter.

Specified by:
eGet in interface IEStructuralFeatureValueGetter
Parameters:
eObject - The context eObject whose EStructuralFeature's value is to be returned
eFeature - The EStructuralFeature whose value is to be returned
resolve - A boolean flag indicating whether to resolve or not when extracting the value.
Returns:
Object the value held by the eFeature argument

resolve

public EObject resolve(EObject eObject)
Does nothing. Returns the same eObject passed.

Specified by:
resolve in interface IEStructuralFeatureValueGetter
Parameters:
eObject - The EObject to be prepared
Returns:
EObject the prepared EObject
See Also:
IEStructuralFeatureValueGetter.resolve(org.eclipse.emf.ecore.EObject)

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