org.eclipse.ocl.examples.domain.utilities
Class StandaloneProjectMap.LoadGeneratedPackageStrategy

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.AbstractResourceLoadStrategy
      extended by org.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.LoadGeneratedPackageStrategy
All Implemented Interfaces:
StandaloneProjectMap.IResourceLoadStrategy
Enclosing class:
StandaloneProjectMap

public static final class StandaloneProjectMap.LoadGeneratedPackageStrategy
extends StandaloneProjectMap.AbstractResourceLoadStrategy

The LoadGeneratedPackageStrategy uses the generated EPackage referenced by the namespace URI for all kinds of access, and then changes the strategy to the LoadedStrategy for all further accesses.


Field Summary
static StandaloneProjectMap.IResourceLoadStrategy INSTANCE
           
 
Constructor Summary
StandaloneProjectMap.LoadGeneratedPackageStrategy()
           
 
Method Summary
 void addedGeneratedPackage(StandaloneProjectMap.IPackageLoadStatus packageLoadStatus, org.eclipse.emf.ecore.EPackage ePackage)
          Respond to the explicit addition of a generated EPackage in the user's ResourceSet.
 void configure(StandaloneProjectMap.IResourceLoadStatus resourceLoadStatus, StandaloneProjectMap.IConflictHandler conflictHandler)
          Configure the resourceLoadStatus to udse this strategy and a conflictHandler.
 org.eclipse.emf.ecore.EPackage getEPackage(StandaloneProjectMap.IPackageLoadStatus packageLoadStatus)
          Load and return the EPackage in response to an EPackage.Registry access through an EPackageDescriptor.
 void handleConflictingDynamicResource(StandaloneProjectMap.IResourceLoadStatus resourceLoadStatus, org.eclipse.emf.ecore.EPackage ePackage)
          Respond to the platform/plugin access to a resource with a resourceLoadStatus containing a package already accessed as the Java generated ePackage,
 void unloadedResource(StandaloneProjectMap.IResourceLoadStatus packageLoadStatus)
          Respond to the notification that the resource has been unloaded.
 
Methods inherited from class org.eclipse.ocl.examples.domain.utilities.StandaloneProjectMap.AbstractResourceLoadStrategy
addedDynamicResource, loadedDynamicResource, loadEPackage, loadModel, returnEPackage, toString, useGeneratedResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

@NonNull
public static final StandaloneProjectMap.IResourceLoadStrategy INSTANCE
Constructor Detail

StandaloneProjectMap.LoadGeneratedPackageStrategy

public StandaloneProjectMap.LoadGeneratedPackageStrategy()
Method Detail

addedGeneratedPackage

public void addedGeneratedPackage(@NonNull
                                  StandaloneProjectMap.IPackageLoadStatus packageLoadStatus,
                                  @NonNull
                                  org.eclipse.emf.ecore.EPackage ePackage)
Description copied from interface: StandaloneProjectMap.IResourceLoadStrategy
Respond to the explicit addition of a generated EPackage in the user's ResourceSet.

Specified by:
addedGeneratedPackage in interface StandaloneProjectMap.IResourceLoadStrategy
Overrides:
addedGeneratedPackage in class StandaloneProjectMap.AbstractResourceLoadStrategy

configure

public void configure(@NonNull
                      StandaloneProjectMap.IResourceLoadStatus resourceLoadStatus,
                      @Nullable
                      StandaloneProjectMap.IConflictHandler conflictHandler)
Description copied from interface: StandaloneProjectMap.IResourceLoadStrategy
Configure the resourceLoadStatus to udse this strategy and a conflictHandler.

Specified by:
configure in interface StandaloneProjectMap.IResourceLoadStrategy
Overrides:
configure in class StandaloneProjectMap.AbstractResourceLoadStrategy

handleConflictingDynamicResource

public void handleConflictingDynamicResource(@NonNull
                                             StandaloneProjectMap.IResourceLoadStatus resourceLoadStatus,
                                             @NonNull
                                             org.eclipse.emf.ecore.EPackage ePackage)
Description copied from interface: StandaloneProjectMap.IResourceLoadStrategy
Respond to the platform/plugin access to a resource with a resourceLoadStatus containing a package already accessed as the Java generated ePackage,

Specified by:
handleConflictingDynamicResource in interface StandaloneProjectMap.IResourceLoadStrategy
Overrides:
handleConflictingDynamicResource in class StandaloneProjectMap.AbstractResourceLoadStrategy

getEPackage

@Nullable
public org.eclipse.emf.ecore.EPackage getEPackage(@NonNull
                                                           StandaloneProjectMap.IPackageLoadStatus packageLoadStatus)
Description copied from interface: StandaloneProjectMap.IResourceLoadStrategy
Load and return the EPackage in response to an EPackage.Registry access through an EPackageDescriptor.


unloadedResource

public void unloadedResource(@NonNull
                             StandaloneProjectMap.IResourceLoadStatus packageLoadStatus)
Description copied from interface: StandaloneProjectMap.IResourceLoadStrategy
Respond to the notification that the resource has been unloaded.