public abstract class AbstractSessionBasedScope extends AbstractScope
IFeatureScopeSession.
The scope can only handle feature references.
It does not support case insensitivity.
Clients may extend concrete subtypes and adjust the name processing or apply general
filtering by overriding addToList(IEObjectDescription, List) or addToList(List, List).| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractSessionBasedScope.NameAcceptor |
AbstractScope.ParentIterable| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSessionBasedScope(IScope parent,
IFeatureScopeSession session,
XAbstractFeatureCall featureCall) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToList(IEObjectDescription description,
List<IEObjectDescription> result)
Clients may override to reject certain descriptions from the result.
|
protected void |
addToList(List<IEObjectDescription> descriptions,
List<IEObjectDescription> result)
Clients may override to reject certain descriptions from the result.
|
protected List<JvmFeature> |
findAllFeaturesByName(JvmType type,
String simpleName,
IResolvedFeatures.Provider resolvedFeaturesProvider) |
protected abstract List<IEObjectDescription> |
getAllLocalElements() |
Iterable<IEObjectDescription> |
getElements(QualifiedName name) |
protected XAbstractFeatureCall |
getFeatureCall() |
protected Iterable<IEObjectDescription> |
getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object,
org.eclipse.emf.common.util.URI uri) |
protected abstract List<IEObjectDescription> |
getLocalElementsByName(QualifiedName name) |
protected IFeatureScopeSession |
getSession() |
protected String |
getShadowingKey(IEObjectDescription description) |
protected boolean |
isShadowed(IEObjectDescription fromParent) |
protected void |
processAsPropertyNames(QualifiedName name,
AbstractSessionBasedScope.NameAcceptor acceptor)
Considers the given name to be a property name.
|
protected void |
processFeatureNames(QualifiedName name,
AbstractSessionBasedScope.NameAcceptor acceptor) |
protected String |
toProperty(String methodName,
JvmFeature feature) |
protected String |
toProperty(String methodName,
JvmFeature feature,
int getterParams,
int setterParams) |
protected String |
tryGetAsPropertyName(String name)
Returns the name as a property name, e.g. a prefix
get, is or set
can be used with the result of this method. |
getAllElements, getElements, getParent, getParentElements, getSingleElement, getSingleElement, getSingleLocalElementByName, isIgnoreCase, toStringprotected AbstractSessionBasedScope(IScope parent, IFeatureScopeSession session, XAbstractFeatureCall featureCall)
protected abstract List<IEObjectDescription> getAllLocalElements()
getAllLocalElements in class AbstractScopeprotected IFeatureScopeSession getSession()
protected XAbstractFeatureCall getFeatureCall()
protected void processFeatureNames(QualifiedName name, AbstractSessionBasedScope.NameAcceptor acceptor)
protected List<JvmFeature> findAllFeaturesByName(JvmType type, String simpleName, IResolvedFeatures.Provider resolvedFeaturesProvider)
protected void processAsPropertyNames(QualifiedName name, AbstractSessionBasedScope.NameAcceptor acceptor)
protected String toProperty(String methodName, JvmFeature feature)
protected String toProperty(String methodName, JvmFeature feature, int getterParams, int setterParams)
protected String tryGetAsPropertyName(String name)
get, is or set
can be used with the result of this method.
If the given name is invalid, the result is null.protected void addToList(IEObjectDescription description, List<IEObjectDescription> result)
AbstractSessionBasedScope
in the framework code will delegate to this method to accumulate descriptions in a list.addToList(List, List)protected void addToList(List<IEObjectDescription> descriptions, List<IEObjectDescription> result)
AbstractSessionBasedScope
in the framework code will delegate to this method to accumulate descriptions in a list.addToList(IEObjectDescription, List)protected abstract List<IEObjectDescription> getLocalElementsByName(QualifiedName name)
getLocalElementsByName in class AbstractScopepublic Iterable<IEObjectDescription> getElements(QualifiedName name)
getElements in interface IScopegetElements in class AbstractScopeprotected Iterable<IEObjectDescription> getLocalElementsByEObject(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.common.util.URI uri)
getLocalElementsByEObject in class AbstractScopeprotected String getShadowingKey(IEObjectDescription description)
protected boolean isShadowed(IEObjectDescription fromParent)
isShadowed in class AbstractScopeCopyright © 2015. All Rights Reserved.