org.eclipse.emf.ecore.util
Class EcoreUtil.ProxyCrossReferencer

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<EObject,java.util.Collection<EStructuralFeature.Setting>>
          extended by org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer
              extended by org.eclipse.emf.ecore.util.EcoreUtil.ProxyCrossReferencer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>>
Enclosing class:
EcoreUtil

public static class EcoreUtil.ProxyCrossReferencer
extends EcoreUtil.CrossReferencer

A cross referencer that finds proxies; the cross referencer will not cause proxies to be resolved.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer
emfObjects
 
Constructor Summary
protected EcoreUtil.ProxyCrossReferencer(java.util.Collection<?> emfObjects)
          Creates an instance for the given collection of objects.
protected EcoreUtil.ProxyCrossReferencer(EObject eObject)
          Creates an instance for the given object.
protected EcoreUtil.ProxyCrossReferencer(Resource resource)
          Creates an instance for the given resource.
protected EcoreUtil.ProxyCrossReferencer(ResourceSet resourceSet)
          Creates an instance for the given resource set.
 
Method Summary
protected  boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject)
          Return true if the specified eReference from eObject to crossReferencedEObject should be considered a cross reference by this cross referencer.
static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(java.util.Collection<?> emfObjects)
          Returns a map of all proxy references from the specified content tree.
static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(EObject eObject)
          Returns a map of all proxy references from the specified content tree.
static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(Resource resource)
          Returns a map of all proxy references from the specified content tree.
static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(ResourceSet resourceSet)
          Returns a map of all proxy references from the specified content tree.
protected  java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> findProxyCrossReferences()
          Returns the map of proxy references for this cross referencer.
protected  boolean resolve()
          Return true if potential cross references that are proxies should be resolved.
 
Methods inherited from class org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer
add, containment, crossReference, done, getCollection, getCrossReferences, handleCrossReference, newCollection, newContentsIterator, print, print, toString
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

EcoreUtil.ProxyCrossReferencer

protected EcoreUtil.ProxyCrossReferencer(EObject eObject)
Creates an instance for the given object.

Parameters:
eObject - the object to cross reference.

EcoreUtil.ProxyCrossReferencer

protected EcoreUtil.ProxyCrossReferencer(Resource resource)
Creates an instance for the given resource.

Parameters:
resource - the resource to cross reference.

EcoreUtil.ProxyCrossReferencer

protected EcoreUtil.ProxyCrossReferencer(ResourceSet resourceSet)
Creates an instance for the given resource set.

Parameters:
resourceSet - the resource set to cross reference.

EcoreUtil.ProxyCrossReferencer

protected EcoreUtil.ProxyCrossReferencer(java.util.Collection<?> emfObjects)
Creates an instance for the given collection of objects.

Parameters:
emfObjects - the collection of objects to cross reference.
Method Detail

resolve

protected boolean resolve()
Return true if potential cross references that are proxies should be resolved.

Overrides:
resolve in class EcoreUtil.CrossReferencer
Returns:
if the cross referencer should resolve proxies.

crossReference

protected boolean crossReference(EObject eObject,
                                 EReference eReference,
                                 EObject crossReferencedEObject)
Return true if the specified eReference from eObject to crossReferencedEObject should be considered a cross reference by this cross referencer.

Overrides:
crossReference in class EcoreUtil.CrossReferencer
Parameters:
eObject - an object in the cross referencer's content tree.
eReference - a reference from the object.
crossReferencedEObject - the target of the specified reference.
Returns:
if the cross referencer should consider the specified reference a cross reference.

findProxyCrossReferences

protected java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> findProxyCrossReferences()
Returns the map of proxy references for this cross referencer.

Returns:
a map of cross references.

find

public static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(EObject eObject)
Returns a map of all proxy references from the specified content tree.

Parameters:
eObject - an object whose content trees should be considered.
Returns:
a map of cross references.

find

public static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(Resource resource)
Returns a map of all proxy references from the specified content tree.

Parameters:
resource - a resource whose content tree should be considered.
Returns:
a map of cross references.

find

public static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(ResourceSet resourceSet)
Returns a map of all proxy references from the specified content tree.

Parameters:
resourceSet - a resourceSet whose content tree should be considered.
Returns:
a map of cross references.

find

public static java.util.Map<EObject,java.util.Collection<EStructuralFeature.Setting>> find(java.util.Collection<?> emfObjects)
Returns a map of all proxy references from the specified content tree.

Parameters:
emfObjects - a collection of objects whose combined content trees should be considered.
Returns:
a map of cross references.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.