public class JvmModelAssociator extends Object implements IJvmModelAssociations, IJvmModelAssociator, ILogicalContainerProvider, IDerivedStateComputer
| Modifier and Type | Class and Description |
|---|---|
static class |
JvmModelAssociator.Adapter |
static class |
JvmModelAssociator.JvmDeclaredTypeAcceptor |
protected static class |
JvmModelAssociator.ListBasedSet<E> |
| Constructor and Description |
|---|
JvmModelAssociator() |
| Modifier and Type | Method and Description |
|---|---|
void |
associate(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
Associated the given source element with the given jvmElement.
|
void |
associateLogicalContainer(XExpression logicalChild,
JvmIdentifiableElement element)
Sets the given
JvmIdentifiableElement as the logical container of the given XExpression. |
void |
associatePrimary(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
Associated the given source element with the given jvmElement and marks the association as primary
on both sides.
|
protected void |
checkLanguageResource(org.eclipse.emf.ecore.resource.Resource eResource) |
protected void |
checkSameResource(org.eclipse.emf.ecore.resource.Resource eResource,
org.eclipse.emf.ecore.resource.Resource eResource2) |
void |
cleanAssociationState(org.eclipse.emf.ecore.resource.Resource resource) |
void |
discardDerivedState(DerivedStateAwareResource resource) |
XExpression |
getAssociatedExpression(JvmIdentifiableElement element) |
Set<org.eclipse.emf.ecore.EObject> |
getJvmElements(org.eclipse.emf.ecore.EObject sourceElement) |
protected JvmIdentifiableElement |
getLogicalContainer(org.eclipse.emf.ecore.EObject object,
boolean considerContainer) |
JvmIdentifiableElement |
getLogicalContainer(XExpression context) |
protected Map<org.eclipse.emf.ecore.EObject,JvmIdentifiableElement> |
getLogicalContainerMapping(org.eclipse.emf.ecore.resource.Resource resource) |
JvmIdentifiableElement |
getNearestLogicalContainer(org.eclipse.emf.ecore.EObject context) |
protected JvmModelAssociator.Adapter |
getOrInstall(org.eclipse.emf.ecore.resource.Resource resource) |
org.eclipse.emf.ecore.EObject |
getPrimaryJvmElement(org.eclipse.emf.ecore.EObject sourceElement) |
org.eclipse.emf.ecore.EObject |
getPrimarySourceElement(org.eclipse.emf.ecore.EObject jvmElement) |
protected org.eclipse.emf.ecore.resource.Resource |
getResource(org.eclipse.emf.common.notify.Notifier ctx) |
Set<org.eclipse.emf.ecore.EObject> |
getSourceElements(org.eclipse.emf.ecore.EObject jvmElement) |
void |
installDerivedState(DerivedStateAwareResource resource,
boolean preIndexingPhase) |
boolean |
isPrimaryJvmElement(org.eclipse.emf.ecore.EObject jvmElement) |
static <K,V> void |
putIntoSmallSetMap(K key,
V value,
Map<? super K,Set<V>> map) |
static <K,V> void |
putIntoSmallSetMap(K key,
V value,
Map<? super K,Set<V>> map,
boolean head) |
void |
removeAllAssociation(org.eclipse.emf.ecore.EObject jvmElement)
Removes all associations for the given jvm element.
|
void |
removeAssociation(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
Removes an association between the given source and jvm elements.
|
void |
removeLogicalChildAssociation(JvmIdentifiableElement container)
Removes the logically contained child of the given identifiable.
|
void |
setCompleter(JvmModelCompleter completer) |
void |
setInferrerProvider(com.google.inject.Provider<IJvmModelInferrer> inferrerProvider) |
protected Map<org.eclipse.emf.ecore.EObject,Set<org.eclipse.emf.ecore.EObject>> |
sourceToTargetMap(org.eclipse.emf.ecore.resource.Resource res) |
protected Map<org.eclipse.emf.ecore.EObject,Set<org.eclipse.emf.ecore.EObject>> |
targetToSourceMap(org.eclipse.emf.ecore.resource.Resource res) |
public void setCompleter(JvmModelCompleter completer)
public void setInferrerProvider(com.google.inject.Provider<IJvmModelInferrer> inferrerProvider)
protected JvmModelAssociator.Adapter getOrInstall(org.eclipse.emf.ecore.resource.Resource resource)
protected Map<org.eclipse.emf.ecore.EObject,JvmIdentifiableElement> getLogicalContainerMapping(org.eclipse.emf.ecore.resource.Resource resource)
public XExpression getAssociatedExpression(JvmIdentifiableElement element)
getAssociatedExpression in interface ILogicalContainerProviderJvmIdentifiableElementpublic JvmIdentifiableElement getLogicalContainer(XExpression context)
getLogicalContainer in interface ILogicalContainerProvidernull if this expression doesn't have such a context.public JvmIdentifiableElement getNearestLogicalContainer(org.eclipse.emf.ecore.EObject context)
getNearestLogicalContainer in interface ILogicalContainerProvidernull if this expression doesn't live in such a context.protected JvmIdentifiableElement getLogicalContainer(org.eclipse.emf.ecore.EObject object, boolean considerContainer)
public void associateLogicalContainer(XExpression logicalChild, JvmIdentifiableElement element)
IJvmModelAssociatorJvmIdentifiableElement as the logical container of the given XExpression.
The container must be an instanceof JvmExecutable or JvmField.
The logical container is used to scope and link the given expression.
Associating the logical container of an expression, automatically removes any previously logical containers for the given expression.associateLogicalContainer in interface IJvmModelAssociatorlogicalChild - the expression that is put into a scopeelement - a method, constructor or field that should act as the logical container of the given expressionpublic void removeLogicalChildAssociation(JvmIdentifiableElement container)
IJvmModelAssociatorremoveLogicalChildAssociation in interface IJvmModelAssociatorprotected Map<org.eclipse.emf.ecore.EObject,Set<org.eclipse.emf.ecore.EObject>> sourceToTargetMap(org.eclipse.emf.ecore.resource.Resource res)
protected Map<org.eclipse.emf.ecore.EObject,Set<org.eclipse.emf.ecore.EObject>> targetToSourceMap(org.eclipse.emf.ecore.resource.Resource res)
protected org.eclipse.emf.ecore.resource.Resource getResource(org.eclipse.emf.common.notify.Notifier ctx)
public void associate(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
IJvmModelAssociatorassociate in interface IJvmModelAssociatorsourceElement - the source EObjectjvmElement - the inferred EObjectprotected void checkLanguageResource(org.eclipse.emf.ecore.resource.Resource eResource)
protected void checkSameResource(org.eclipse.emf.ecore.resource.Resource eResource,
org.eclipse.emf.ecore.resource.Resource eResource2)
public void associatePrimary(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
IJvmModelAssociatorassociatePrimary in interface IJvmModelAssociatorsourceElement - the source EObjectjvmElement - the inferred EObjectpublic static <K,V> void putIntoSmallSetMap(K key,
V value,
Map<? super K,Set<V>> map)
public static <K,V> void putIntoSmallSetMap(K key,
V value,
Map<? super K,Set<V>> map,
boolean head)
public Set<org.eclipse.emf.ecore.EObject> getJvmElements(org.eclipse.emf.ecore.EObject sourceElement)
getJvmElements in interface IJvmModelAssociationspublic Set<org.eclipse.emf.ecore.EObject> getSourceElements(org.eclipse.emf.ecore.EObject jvmElement)
getSourceElements in interface IJvmModelAssociationspublic org.eclipse.emf.ecore.EObject getPrimarySourceElement(org.eclipse.emf.ecore.EObject jvmElement)
getPrimarySourceElement in interface IJvmModelAssociationspublic void installDerivedState(DerivedStateAwareResource resource, boolean preIndexingPhase)
installDerivedState in interface IDerivedStateComputerpublic void discardDerivedState(DerivedStateAwareResource resource)
discardDerivedState in interface IDerivedStateComputerpublic void cleanAssociationState(org.eclipse.emf.ecore.resource.Resource resource)
public void removeAssociation(org.eclipse.emf.ecore.EObject sourceElement,
org.eclipse.emf.ecore.EObject jvmElement)
IJvmModelAssociatorremoveAssociation in interface IJvmModelAssociatorpublic void removeAllAssociation(org.eclipse.emf.ecore.EObject jvmElement)
IJvmModelAssociatorremoveAllAssociation in interface IJvmModelAssociatorpublic org.eclipse.emf.ecore.EObject getPrimaryJvmElement(org.eclipse.emf.ecore.EObject sourceElement)
getPrimaryJvmElement in interface IJvmModelAssociationsJvmElementsProxifyingUnloader element for the given source element.public boolean isPrimaryJvmElement(org.eclipse.emf.ecore.EObject jvmElement)
isPrimaryJvmElement in interface IJvmModelAssociationsCopyright © 2015. All Rights Reserved.