@NonNullByDefault public interface IFeatureScopeSession extends IVisibilityHelper
IScope
by means of
getScope(EObject, EReference, IResolvedTypes)
.ALL
Modifier and Type | Method and Description |
---|---|
IFeatureScopeSession |
addLocalElement(QualifiedName name,
JvmIdentifiableElement element,
ITypeReferenceOwner owner)
Add a locally defined identifiable to this scope.
|
IFeatureScopeSession |
addLocalElements(java.util.Map<QualifiedName,JvmIdentifiableElement> elements,
ITypeReferenceOwner owner)
Add locally defined identifiables to this scope.
|
IFeatureScopeSession |
addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
Add receivers to the session that contribute extensions.
|
IFeatureScopeSession |
addTypesToStaticScope(java.util.List<? extends JvmType> staticFeatureProviders,
java.util.List<? extends JvmType> staticExtensionProviders)
Add types to the session that are imported statically either as plain static imports
or with an extension semantic.
|
java.util.List<ExpressionBucket> |
getExtensionProviders()
All extension providers as expression buckets.
|
IEObjectDescription |
getLocalElement(QualifiedName name)
Find a local element with the given qualified name.
|
java.util.Collection<IEObjectDescription> |
getLocalElements()
Return all local elements that are known in this session.
|
IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference,
IResolvedTypes types)
Return the scope for the given
context and reference based on the
known resolved types . |
java.util.List<TypeBucket> |
getStaticallyImportedExtensionTypes()
All statically imported extension types as type buckets.
|
java.util.List<TypeBucket> |
getStaticallyImportedTypes()
All statically imported types as type buckets.
|
boolean |
isInstanceContext()
Returns
true if this can be validly resolved in the current scope. |
boolean |
isVisible(JvmMember member,
JvmIdentifiableElement receiverFeature)
Returns
true if the member is visible according to the JvmVisibility and the local context
when invoked on the given receiver feature which resolves to the given type. |
IFeatureScopeSession |
toInstanceContext()
Forks this session with an instance context.
|
isVisible
IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, IResolvedTypes types)
context
and reference
based on the
known resolved types
.context
- the context object. May not be null
.reference
- the reference that holds the unresolved proxy. May not be null
.types
- the already computed types.IScopeProvider.getScope(EObject, EReference)
IFeatureScopeSession addTypesToStaticScope(java.util.List<? extends JvmType> staticFeatureProviders, java.util.List<? extends JvmType> staticExtensionProviders)
staticFeatureProviders
- the static feature providers. May not be null
.staticExtensionProviders
- the static extension providers. May not be null
.IFeatureScopeSession addToExtensionScope(java.util.Map<XExpression,LightweightTypeReference> extensionProviders)
extensionProviders
- the expressions that yield extension receivers.IFeatureScopeSession toInstanceContext()
isInstanceContext()
boolean isInstanceContext()
true
if this
can be validly resolved in the current scope.toInstanceContext()
java.util.List<ExpressionBucket> getExtensionProviders()
IFeatureScopeSession addLocalElement(QualifiedName name, JvmIdentifiableElement element, ITypeReferenceOwner owner)
name
- the qualified name of the identifiable.element
- the element itself.IFeatureScopeSession addLocalElements(java.util.Map<QualifiedName,JvmIdentifiableElement> elements, ITypeReferenceOwner owner)
elements
- the local elements.@Nullable IEObjectDescription getLocalElement(QualifiedName name)
null
.java.util.Collection<IEObjectDescription> getLocalElements()
null
.java.util.List<TypeBucket> getStaticallyImportedTypes()
java.util.List<TypeBucket> getStaticallyImportedExtensionTypes()
boolean isVisible(JvmMember member, @Nullable JvmIdentifiableElement receiverFeature)
true
if the member is visible according to the JvmVisibility
and the local context
when invoked on the given receiver feature which resolves to the given type.member
- the member that shall be accessed.receiverFeature
- the links the receiver of the feature call to the given member. May be unknown.true
if the feature can be accessed.