public class AllInstancesContentAdapter
extends EContentAdapter
EObject
s in the scope observed (typically
a ResourceSet
), keyed by the EClass
es to which the objects conform. This allows
for fast lookup, e.g., of an allInstances()
expression value in the given scope.Constructor and Description |
---|
AllInstancesContentAdapter() |
Modifier and Type | Method and Description |
---|---|
Set<EObject> |
allInstances(EClass c) |
static AllInstancesContentAdapter |
getInstanceForRootContextOf(Notifier context)
Looks up an adapter of type
AllInstancesContentAdapter in the adapter list of
context 's root context. |
public static AllInstancesContentAdapter getInstanceForRootContextOf(Notifier context)
AllInstancesContentAdapter
in the adapter list of
context
's root context. The root context is determined by ascending the EObject
containment hierarchy, then to a Resource
and perhaps a ResourceSet
. The last element
reachable in this order is the root context. If on this root context an adapter of type
AllInstancesContentAdapter
is already registered, it is returned. Otherwise, a new
adapter of this class is created and added to the root context's adapter list. This will recursively
apply the adapter to all contents, populating the adapter's allInstances
map so that
afterwards allInstances(EClass)
returns results in the scope of context
's
root context.public Set<EObject> allInstances(EClass c)
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.