org.eclipse.emf.ecore.change_2.9.0.v20130827-0309

16:43:30.445 INFO  jd.cli.Main - Decompiling org.eclipse.emf.ecore.change_2.9.0.v20130827-0309.jar
package org.eclipse.emf.ecore.change;

import java.util.Map;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;

public abstract interface ChangeDescription
  extends EObject
{
  public abstract EMap<EObject, EList<FeatureChange>> getObjectChanges();
  
  public abstract EList<EObject> getObjectsToDetach();
  
  public abstract EList<EObject> getObjectsToAttach();
  
  public abstract EList<ResourceChange> getResourceChanges();
  
  public abstract void apply();
  
  public abstract void applyAndReverse();
  
  public abstract void copyAndReverse(Map<EObject, URI> paramMap);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangeDescription
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import java.util.Map.Entry;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.change.impl.ChangeFactoryImpl;
import org.eclipse.emf.ecore.resource.Resource;

public abstract interface ChangeFactory
  extends EFactory
{
  public static final ChangeFactory eINSTANCE = ;
  
  public abstract ChangeDescription createChangeDescription();
  
  public abstract FeatureChange createFeatureChange();
  
  public abstract FeatureChange createFeatureChange(EStructuralFeature paramEStructuralFeature, Object paramObject, boolean paramBoolean);
  
  public abstract ListChange createListChange();
  
  public abstract ResourceChange createResourceChange();
  
  public abstract ResourceChange createResourceChange(Resource paramResource, EList<Object> paramEList);
  
  public abstract FeatureMapEntry createFeatureMapEntry();
  
  public abstract FeatureMapEntry createFeatureMapEntry(EStructuralFeature paramEStructuralFeature, Object paramObject);
  
  public abstract ChangePackage getChangePackage();
  
  public abstract Map.Entry<EObject, EList<FeatureChange>> createEObjectToChangesMapEntry(EObject paramEObject);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangeFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;

public enum ChangeKind
  implements Enumerator
{
  ADD_LITERAL(
  
    0, "ADD", "ADD"),  REMOVE_LITERAL(
  
    1, "REMOVE", "REMOVE"),  MOVE_LITERAL(
  
    2, "MOVE", "MOVE");
  
  public static final int ADD = 0;
  public static final int REMOVE = 1;
  public static final int MOVE = 2;
  private static final ChangeKind[] VALUES_ARRAY = {
    ADD_LITERAL, 
    REMOVE_LITERAL, 
    MOVE_LITERAL };
  public static final List<ChangeKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
  private final int value;
  private final String name;
  private final String literal;
  
  public static ChangeKind get(String literal)
  {
    for (int i = 0; i < VALUES_ARRAY.length; i++)
    {
      ChangeKind result = VALUES_ARRAY[i];
      if (result.toString().equals(literal)) {
        return result;
      }
    }
    return null;
  }
  
  public static ChangeKind getByName(String name)
  {
    for (int i = 0; i < VALUES_ARRAY.length; i++)
    {
      ChangeKind result = VALUES_ARRAY[i];
      if (result.getName().equals(name)) {
        return result;
      }
    }
    return null;
  }
  
  public static ChangeKind get(int value)
  {
    switch (value)
    {
    case 0: 
      return ADD_LITERAL;
    case 1: 
      return REMOVE_LITERAL;
    case 2: 
      return MOVE_LITERAL;
    }
    return null;
  }
  
  private ChangeKind(int value, String name, String literal)
  {
    this.value = value;
    this.name = name;
    this.literal = literal;
  }
  
  public int getValue()
  {
    return value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public String getLiteral()
  {
    return literal;
  }
  
  public String toString()
  {
    return literal;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangeKind
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EReference;

public abstract interface ChangePackage$Literals
{
  public static final EClass CHANGE_DESCRIPTION = ChangePackage.eINSTANCE.getChangeDescription();
  public static final EReference CHANGE_DESCRIPTION__OBJECT_CHANGES = ChangePackage.eINSTANCE.getChangeDescription_ObjectChanges();
  public static final EReference CHANGE_DESCRIPTION__OBJECTS_TO_DETACH = ChangePackage.eINSTANCE.getChangeDescription_ObjectsToDetach();
  public static final EReference CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH = ChangePackage.eINSTANCE.getChangeDescription_ObjectsToAttach();
  public static final EReference CHANGE_DESCRIPTION__RESOURCE_CHANGES = ChangePackage.eINSTANCE.getChangeDescription_ResourceChanges();
  public static final EClass EOBJECT_TO_CHANGES_MAP_ENTRY = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry();
  public static final EReference EOBJECT_TO_CHANGES_MAP_ENTRY__KEY = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry_Key();
  public static final EReference EOBJECT_TO_CHANGES_MAP_ENTRY__VALUE = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry_Value();
  public static final EClass FEATURE_CHANGE = ChangePackage.eINSTANCE.getFeatureChange();
  public static final EAttribute FEATURE_CHANGE__FEATURE_NAME = ChangePackage.eINSTANCE.getFeatureChange_FeatureName();
  public static final EAttribute FEATURE_CHANGE__DATA_VALUE = ChangePackage.eINSTANCE.getFeatureChange_DataValue();
  public static final EAttribute FEATURE_CHANGE__SET = ChangePackage.eINSTANCE.getFeatureChange_Set();
  public static final EAttribute FEATURE_CHANGE__VALUE = ChangePackage.eINSTANCE.getFeatureChange_Value();
  public static final EReference FEATURE_CHANGE__FEATURE = ChangePackage.eINSTANCE.getFeatureChange_Feature();
  public static final EReference FEATURE_CHANGE__REFERENCE_VALUE = ChangePackage.eINSTANCE.getFeatureChange_ReferenceValue();
  public static final EReference FEATURE_CHANGE__LIST_CHANGES = ChangePackage.eINSTANCE.getFeatureChange_ListChanges();
  public static final EClass LIST_CHANGE = ChangePackage.eINSTANCE.getListChange();
  public static final EAttribute LIST_CHANGE__KIND = ChangePackage.eINSTANCE.getListChange_Kind();
  public static final EAttribute LIST_CHANGE__DATA_VALUES = ChangePackage.eINSTANCE.getListChange_DataValues();
  public static final EAttribute LIST_CHANGE__INDEX = ChangePackage.eINSTANCE.getListChange_Index();
  public static final EAttribute LIST_CHANGE__MOVE_TO_INDEX = ChangePackage.eINSTANCE.getListChange_MoveToIndex();
  public static final EAttribute LIST_CHANGE__VALUES = ChangePackage.eINSTANCE.getListChange_Values();
  public static final EReference LIST_CHANGE__REFERENCE_VALUES = ChangePackage.eINSTANCE.getListChange_ReferenceValues();
  public static final EReference LIST_CHANGE__FEATURE = ChangePackage.eINSTANCE.getListChange_Feature();
  public static final EReference LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES = ChangePackage.eINSTANCE.getListChange_FeatureMapEntryValues();
  public static final EClass RESOURCE_CHANGE = ChangePackage.eINSTANCE.getResourceChange();
  public static final EAttribute RESOURCE_CHANGE__RESOURCE_URI = ChangePackage.eINSTANCE.getResourceChange_ResourceURI();
  public static final EAttribute RESOURCE_CHANGE__RESOURCE = ChangePackage.eINSTANCE.getResourceChange_Resource();
  public static final EAttribute RESOURCE_CHANGE__VALUE = ChangePackage.eINSTANCE.getResourceChange_Value();
  public static final EReference RESOURCE_CHANGE__LIST_CHANGES = ChangePackage.eINSTANCE.getResourceChange_ListChanges();
  public static final EClass FEATURE_MAP_ENTRY = ChangePackage.eINSTANCE.getFeatureMapEntry();
  public static final EAttribute FEATURE_MAP_ENTRY__FEATURE_NAME = ChangePackage.eINSTANCE.getFeatureMapEntry_FeatureName();
  public static final EAttribute FEATURE_MAP_ENTRY__DATA_VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_DataValue();
  public static final EAttribute FEATURE_MAP_ENTRY__VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_Value();
  public static final EReference FEATURE_MAP_ENTRY__FEATURE = ChangePackage.eINSTANCE.getFeatureMapEntry_Feature();
  public static final EReference FEATURE_MAP_ENTRY__REFERENCE_VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_ReferenceValue();
  public static final EEnum CHANGE_KIND = ChangePackage.eINSTANCE.getChangeKind();
  public static final EDataType EOBJECT_TO_URI_MAP = ChangePackage.eINSTANCE.getEObjectToURIMap();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangePackage.Literals
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.change.impl.ChangePackageImpl;

public abstract interface ChangePackage
  extends EPackage
{
  public static final String eNAME = "change";
  public static final String eNS_URI = "http://www.eclipse.org/emf/2003/Change";
  public static final String eNS_PREFIX = "change";
  public static final ChangePackage eINSTANCE = ;
  public static final int CHANGE_DESCRIPTION = 0;
  public static final int CHANGE_DESCRIPTION__OBJECT_CHANGES = 0;
  public static final int CHANGE_DESCRIPTION__OBJECTS_TO_DETACH = 1;
  public static final int CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH = 2;
  public static final int CHANGE_DESCRIPTION__RESOURCE_CHANGES = 3;
  public static final int CHANGE_DESCRIPTION_FEATURE_COUNT = 4;
  public static final int EOBJECT_TO_CHANGES_MAP_ENTRY = 1;
  public static final int EOBJECT_TO_CHANGES_MAP_ENTRY__KEY = 0;
  public static final int EOBJECT_TO_CHANGES_MAP_ENTRY__VALUE = 1;
  public static final int EOBJECT_TO_CHANGES_MAP_ENTRY_FEATURE_COUNT = 2;
  public static final int FEATURE_CHANGE = 2;
  public static final int FEATURE_CHANGE__FEATURE_NAME = 0;
  public static final int FEATURE_CHANGE__DATA_VALUE = 1;
  public static final int FEATURE_CHANGE__SET = 2;
  public static final int FEATURE_CHANGE__VALUE = 3;
  public static final int FEATURE_CHANGE__FEATURE = 4;
  public static final int FEATURE_CHANGE__REFERENCE_VALUE = 5;
  public static final int FEATURE_CHANGE__LIST_CHANGES = 6;
  public static final int FEATURE_CHANGE_FEATURE_COUNT = 7;
  public static final int LIST_CHANGE = 3;
  public static final int LIST_CHANGE__KIND = 0;
  public static final int LIST_CHANGE__DATA_VALUES = 1;
  public static final int LIST_CHANGE__INDEX = 2;
  public static final int LIST_CHANGE__MOVE_TO_INDEX = 3;
  public static final int LIST_CHANGE__VALUES = 4;
  public static final int LIST_CHANGE__REFERENCE_VALUES = 5;
  public static final int LIST_CHANGE__FEATURE = 6;
  public static final int LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES = 7;
  public static final int LIST_CHANGE_FEATURE_COUNT = 8;
  public static final int RESOURCE_CHANGE = 4;
  public static final int RESOURCE_CHANGE__RESOURCE_URI = 0;
  public static final int RESOURCE_CHANGE__RESOURCE = 1;
  public static final int RESOURCE_CHANGE__VALUE = 2;
  public static final int RESOURCE_CHANGE__LIST_CHANGES = 3;
  public static final int RESOURCE_CHANGE_FEATURE_COUNT = 4;
  public static final int FEATURE_MAP_ENTRY = 5;
  public static final int FEATURE_MAP_ENTRY__FEATURE_NAME = 0;
  public static final int FEATURE_MAP_ENTRY__DATA_VALUE = 1;
  public static final int FEATURE_MAP_ENTRY__VALUE = 2;
  public static final int FEATURE_MAP_ENTRY__FEATURE = 3;
  public static final int FEATURE_MAP_ENTRY__REFERENCE_VALUE = 4;
  public static final int FEATURE_MAP_ENTRY_FEATURE_COUNT = 5;
  public static final int CHANGE_KIND = 6;
  public static final int EOBJECT_TO_URI_MAP = 7;
  
  public abstract EClass getChangeDescription();
  
  public abstract EReference getChangeDescription_ObjectChanges();
  
  public abstract EReference getChangeDescription_ObjectsToDetach();
  
  public abstract EReference getChangeDescription_ObjectsToAttach();
  
  public abstract EReference getChangeDescription_ResourceChanges();
  
  public abstract EClass getEObjectToChangesMapEntry();
  
  public abstract EReference getEObjectToChangesMapEntry_Key();
  
  public abstract EReference getEObjectToChangesMapEntry_Value();
  
  public abstract EClass getFeatureChange();
  
  public abstract EAttribute getFeatureChange_FeatureName();
  
  public abstract EAttribute getFeatureChange_DataValue();
  
  public abstract EAttribute getFeatureChange_Set();
  
  public abstract EAttribute getFeatureChange_Value();
  
  public abstract EReference getFeatureChange_Feature();
  
  public abstract EReference getFeatureChange_ReferenceValue();
  
  public abstract EReference getFeatureChange_ListChanges();
  
  public abstract EClass getListChange();
  
  public abstract EAttribute getListChange_Kind();
  
  public abstract EAttribute getListChange_DataValues();
  
  public abstract EAttribute getListChange_Index();
  
  public abstract EAttribute getListChange_MoveToIndex();
  
  public abstract EAttribute getListChange_Values();
  
  public abstract EReference getListChange_ReferenceValues();
  
  public abstract EReference getListChange_Feature();
  
  public abstract EReference getListChange_FeatureMapEntryValues();
  
  public abstract EClass getResourceChange();
  
  public abstract EAttribute getResourceChange_ResourceURI();
  
  public abstract EAttribute getResourceChange_Resource();
  
  public abstract EAttribute getResourceChange_Value();
  
  public abstract EReference getResourceChange_ListChanges();
  
  public abstract EClass getFeatureMapEntry();
  
  public abstract EAttribute getFeatureMapEntry_FeatureName();
  
  public abstract EAttribute getFeatureMapEntry_DataValue();
  
  public abstract EAttribute getFeatureMapEntry_Value();
  
  public abstract EReference getFeatureMapEntry_Feature();
  
  public abstract EReference getFeatureMapEntry_ReferenceValue();
  
  public abstract EEnum getChangeKind();
  
  public abstract EDataType getEObjectToURIMap();
  
  public abstract ChangeFactory getChangeFactory();
  
  public static abstract interface Literals
  {
    public static final EClass CHANGE_DESCRIPTION = ChangePackage.eINSTANCE.getChangeDescription();
    public static final EReference CHANGE_DESCRIPTION__OBJECT_CHANGES = ChangePackage.eINSTANCE.getChangeDescription_ObjectChanges();
    public static final EReference CHANGE_DESCRIPTION__OBJECTS_TO_DETACH = ChangePackage.eINSTANCE.getChangeDescription_ObjectsToDetach();
    public static final EReference CHANGE_DESCRIPTION__OBJECTS_TO_ATTACH = ChangePackage.eINSTANCE.getChangeDescription_ObjectsToAttach();
    public static final EReference CHANGE_DESCRIPTION__RESOURCE_CHANGES = ChangePackage.eINSTANCE.getChangeDescription_ResourceChanges();
    public static final EClass EOBJECT_TO_CHANGES_MAP_ENTRY = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry();
    public static final EReference EOBJECT_TO_CHANGES_MAP_ENTRY__KEY = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry_Key();
    public static final EReference EOBJECT_TO_CHANGES_MAP_ENTRY__VALUE = ChangePackage.eINSTANCE.getEObjectToChangesMapEntry_Value();
    public static final EClass FEATURE_CHANGE = ChangePackage.eINSTANCE.getFeatureChange();
    public static final EAttribute FEATURE_CHANGE__FEATURE_NAME = ChangePackage.eINSTANCE.getFeatureChange_FeatureName();
    public static final EAttribute FEATURE_CHANGE__DATA_VALUE = ChangePackage.eINSTANCE.getFeatureChange_DataValue();
    public static final EAttribute FEATURE_CHANGE__SET = ChangePackage.eINSTANCE.getFeatureChange_Set();
    public static final EAttribute FEATURE_CHANGE__VALUE = ChangePackage.eINSTANCE.getFeatureChange_Value();
    public static final EReference FEATURE_CHANGE__FEATURE = ChangePackage.eINSTANCE.getFeatureChange_Feature();
    public static final EReference FEATURE_CHANGE__REFERENCE_VALUE = ChangePackage.eINSTANCE.getFeatureChange_ReferenceValue();
    public static final EReference FEATURE_CHANGE__LIST_CHANGES = ChangePackage.eINSTANCE.getFeatureChange_ListChanges();
    public static final EClass LIST_CHANGE = ChangePackage.eINSTANCE.getListChange();
    public static final EAttribute LIST_CHANGE__KIND = ChangePackage.eINSTANCE.getListChange_Kind();
    public static final EAttribute LIST_CHANGE__DATA_VALUES = ChangePackage.eINSTANCE.getListChange_DataValues();
    public static final EAttribute LIST_CHANGE__INDEX = ChangePackage.eINSTANCE.getListChange_Index();
    public static final EAttribute LIST_CHANGE__MOVE_TO_INDEX = ChangePackage.eINSTANCE.getListChange_MoveToIndex();
    public static final EAttribute LIST_CHANGE__VALUES = ChangePackage.eINSTANCE.getListChange_Values();
    public static final EReference LIST_CHANGE__REFERENCE_VALUES = ChangePackage.eINSTANCE.getListChange_ReferenceValues();
    public static final EReference LIST_CHANGE__FEATURE = ChangePackage.eINSTANCE.getListChange_Feature();
    public static final EReference LIST_CHANGE__FEATURE_MAP_ENTRY_VALUES = ChangePackage.eINSTANCE.getListChange_FeatureMapEntryValues();
    public static final EClass RESOURCE_CHANGE = ChangePackage.eINSTANCE.getResourceChange();
    public static final EAttribute RESOURCE_CHANGE__RESOURCE_URI = ChangePackage.eINSTANCE.getResourceChange_ResourceURI();
    public static final EAttribute RESOURCE_CHANGE__RESOURCE = ChangePackage.eINSTANCE.getResourceChange_Resource();
    public static final EAttribute RESOURCE_CHANGE__VALUE = ChangePackage.eINSTANCE.getResourceChange_Value();
    public static final EReference RESOURCE_CHANGE__LIST_CHANGES = ChangePackage.eINSTANCE.getResourceChange_ListChanges();
    public static final EClass FEATURE_MAP_ENTRY = ChangePackage.eINSTANCE.getFeatureMapEntry();
    public static final EAttribute FEATURE_MAP_ENTRY__FEATURE_NAME = ChangePackage.eINSTANCE.getFeatureMapEntry_FeatureName();
    public static final EAttribute FEATURE_MAP_ENTRY__DATA_VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_DataValue();
    public static final EAttribute FEATURE_MAP_ENTRY__VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_Value();
    public static final EReference FEATURE_MAP_ENTRY__FEATURE = ChangePackage.eINSTANCE.getFeatureMapEntry_Feature();
    public static final EReference FEATURE_MAP_ENTRY__REFERENCE_VALUE = ChangePackage.eINSTANCE.getFeatureMapEntry_ReferenceValue();
    public static final EEnum CHANGE_KIND = ChangePackage.eINSTANCE.getChangeKind();
    public static final EDataType EOBJECT_TO_URI_MAP = ChangePackage.eINSTANCE.getEObjectToURIMap();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangePackage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.common.EMFPlugin.EclipsePlugin;

public class ChangePlugin$Implementation
  extends EMFPlugin.EclipsePlugin
{
  public ChangePlugin$Implementation()
  {
    ChangePlugin.access$0(this);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangePlugin.Implementation
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.EMFPlugin.EclipsePlugin;
import org.eclipse.emf.common.util.ResourceLocator;

public final class ChangePlugin
  extends EMFPlugin
{
  public static final ChangePlugin INSTANCE = new ChangePlugin();
  private static Implementation plugin;
  
  public ChangePlugin()
  {
    super(new ResourceLocator[0]);
  }
  
  public ResourceLocator getPluginResourceLocator()
  {
    return plugin;
  }
  
  public static Implementation getPlugin()
  {
    return plugin;
  }
  
  public static class Implementation
    extends EMFPlugin.EclipsePlugin
  {
    public Implementation()
    {
      ChangePlugin.plugin = this;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ChangePlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;

public abstract interface FeatureChange
  extends EObject
{
  public abstract String getFeatureName();
  
  public abstract void setFeatureName(String paramString);
  
  public abstract void unsetFeatureName();
  
  public abstract boolean isSetFeatureName();
  
  public abstract String getDataValue();
  
  public abstract void setDataValue(String paramString);
  
  public abstract boolean isSet();
  
  public abstract void setSet(boolean paramBoolean);
  
  public abstract EStructuralFeature getFeature();
  
  public abstract void setFeature(EStructuralFeature paramEStructuralFeature);
  
  public abstract void unsetFeature();
  
  public abstract boolean isSetFeature();
  
  public abstract EObject getReferenceValue();
  
  public abstract void setReferenceValue(EObject paramEObject);
  
  public abstract EList<ListChange> getListChanges();
  
  public abstract Object getValue();
  
  public abstract void apply(EObject paramEObject);
  
  public abstract void applyAndReverse(EObject paramEObject);
  
  public abstract void reverse(EObject paramEObject);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.FeatureChange
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;

public abstract interface FeatureMapEntry
  extends EObject
{
  public abstract String getFeatureName();
  
  public abstract void setFeatureName(String paramString);
  
  public abstract void unsetFeatureName();
  
  public abstract boolean isSetFeatureName();
  
  public abstract String getDataValue();
  
  public abstract void setDataValue(String paramString);
  
  public abstract Object getValue();
  
  public abstract EStructuralFeature getFeature();
  
  public abstract void setFeature(EStructuralFeature paramEStructuralFeature);
  
  public abstract void unsetFeature();
  
  public abstract boolean isSetFeature();
  
  public abstract EObject getReferenceValue();
  
  public abstract void setReferenceValue(EObject paramEObject);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.FeatureMapEntry
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;

public abstract interface ListChange
  extends EObject
{
  public abstract ChangeKind getKind();
  
  public abstract void setKind(ChangeKind paramChangeKind);
  
  public abstract EList<String> getDataValues();
  
  public abstract int getIndex();
  
  public abstract void setIndex(int paramInt);
  
  public abstract int getMoveToIndex();
  
  public abstract void setMoveToIndex(int paramInt);
  
  public abstract EList<EObject> getReferenceValues();
  
  public abstract EStructuralFeature getFeature();
  
  public abstract void setFeature(EStructuralFeature paramEStructuralFeature);
  
  public abstract EList<FeatureMapEntry> getFeatureMapEntryValues();
  
  public abstract EList<Object> getValues();
  
  public abstract void apply(EList<Object> paramEList);
  
  public abstract void applyAndReverse(EList<Object> paramEList);
  
  public abstract void reverse(EList<Object> paramEList);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ListChange
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;

public abstract interface ResourceChange
  extends EObject
{
  public abstract String getResourceURI();
  
  public abstract void setResourceURI(String paramString);
  
  public abstract Resource getResource();
  
  public abstract void setResource(Resource paramResource);
  
  public abstract EList<?> getValue();
  
  public abstract EList<ListChange> getListChanges();
  
  public abstract void apply();
  
  public abstract void applyAndReverse();
  
  public abstract void reverse();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.ResourceChange
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change.impl;

import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EcoreUtil.Copier;

class ChangeDescriptionImpl$1
  extends EcoreUtil.Copier
{
  private static final long serialVersionUID = 1L;
  
  ChangeDescriptionImpl$1(ChangeDescriptionImpl paramChangeDescriptionImpl, Map paramMap) {}
  
  public Set<Map.Entry<EObject, EObject>> entrySet()
  {
    return new HashSet(super.entrySet());
  }
  
  public EObject get(Object key)
  {
    EObject eObject = (EObject)super.get(key);
    if (eObject == null)
    {
      URI proxyURI = (URI)val$eObjectToProxyURIMap.get(key);
      if (proxyURI != null)
      {
        EObject keyEObject = (EObject)key;
        InternalEObject copyEObject = (InternalEObject)createCopy(keyEObject);
        copyEObject.eSetProxyURI(proxyURI);
        put(keyEObject, copyEObject);
        return copyEObject;
      }
    }
    return eObject;
  }
  
  public EObject copy(EObject eObject)
  {
    EObject result = get(eObject);
    if (result != null) {
      return result;
    }
    return super.copy(eObject);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.1
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change.impl;

import java.util.Collection;
import java.util.Map.Entry;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.change.ChangeFactory;
import org.eclipse.emf.ecore.change.FeatureChange;
import org.eclipse.emf.ecore.change.util.ListDifferenceAnalyzer;
import org.eclipse.emf.ecore.util.InternalEList;

class ChangeDescriptionImpl$1Visitor
{
  ListDifferenceAnalyzer listDifferenceAnalyzer;
  
  ChangeDescriptionImpl$1Visitor(ChangeDescriptionImpl paramChangeDescriptionImpl, EMap paramEMap) {}
  
  void visit(Collection<EObject> eObjects)
  {
    for (EObject eObject : eObjects) {
      visit(eObject);
    }
  }
  
  void visit(EObject eObject)
  {
    EClass eClass = eObject.eClass();
    for (EReference eReference : eClass.getEAllReferences()) {
      if ((eReference.isContainment()) || ((!eReference.isContainer()) && (eReference.getEOpposite() != null))) {
        if (eReference.isMany())
        {
          InternalEList<EObject> eObjects = (InternalEList)eObject.eGet(eReference);
          
          EList<EObject> originalEObjects = null;
          
          int i = 0;
          for (int size = eObjects.size(); i < size;)
          {
            EObject value = (EObject)eObjects.basicGet(i);
            if (value.eIsProxy())
            {
              if (originalEObjects == null) {
                originalEObjects = new BasicEList(eObjects);
              }
              eObjects.remove(i);
              size--;
            }
            else
            {
              i++;
            }
          }
          if (originalEObjects != null)
          {
            EList<FeatureChange> featureChanges = (EList)val$objectChanges.get(eObject);
            if (featureChanges == null)
            {
              Map.Entry<EObject, EList<FeatureChange>> entry = ChangeFactory.eINSTANCE.createEObjectToChangesMapEntry(eObject);
              val$objectChanges.add(entry);
              featureChanges = (EList)entry.getValue();
            }
            FeatureChange featureChange = ChangeFactory.eINSTANCE.createFeatureChange();
            featureChange.setFeature(eReference);
            if (listDifferenceAnalyzer == null) {
              listDifferenceAnalyzer = new ListDifferenceAnalyzer();
            }
            EList<Object> modifiedEObjects = eObjects;
            listDifferenceAnalyzer.analyzeLists(modifiedEObjects, originalEObjects, featureChange.getListChanges());
            featureChanges.add(featureChange);
          }
        }
        else
        {
          InternalEObject referencedEObject = (InternalEObject)eObject.eGet(eReference, false);
          if ((referencedEObject != null) && (referencedEObject.eIsProxy()))
          {
            eObject.eUnset(eReference);
            
            EList<FeatureChange> featureChanges = (EList)val$objectChanges.get(eObject);
            if (featureChanges == null)
            {
              Map.Entry<EObject, EList<FeatureChange>> entry = ChangeFactory.eINSTANCE.createEObjectToChangesMapEntry(eObject);
              val$objectChanges.add(entry);
              featureChanges = (EList)entry.getValue();
            }
            FeatureChange featureChange = ChangeFactory.eINSTANCE.createFeatureChange();
            featureChange.setFeature(eReference);
            featureChange.setReferenceValue(referencedEObject);
          }
        }
      }
    }
    visit(eObject.eContents());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.1Visitor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change.impl;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;

public class ChangeDescriptionImpl$OldContainmentInformation
{
  public EObject container;
  public EReference containmentFeature;
  
  public ChangeDescriptionImpl$OldContainmentInformation(EObject container, EReference containmentFeature)
  {
    this.container = container;
    this.containmentFeature = containmentFeature;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.OldContainmentInformation
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.ecore.change.impl;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.BasicEMap;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.UniqueEList.FastCompare;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EStructuralFeature.Internal;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.change.ChangeDescription;
import org.eclipse.emf.ecore.change.ChangeFactory;
import org.eclipse.emf.ecore.change.ChangePackage.Literals;
import org.eclipse.emf.ecore.change.FeatureChange;
import org.eclipse.emf.ecore.change.ListChange;
import org.eclipse.emf.ecore.change.ResourceChange;
import org.eclipse.emf.ecore.change.util.ListDifferenceAnalyzer;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectEList;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
import org.eclipse.emf.ecore.util.FeatureMap.Entry;
import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.ecore.util.InternalEList;

public class ChangeDescriptionImpl
  extends EObjectImpl
  implements ChangeDescription
{
  protected EMap<EObject, EList<FeatureChange>> objectChanges;
  protected EList<EObject> objectsToDetach;
  protected EList<EObject> objectsToAttach;
  protected EList<ResourceChange> resourceChanges;
  protected Map<EObject, OldContainmentInformation> oldContainmentInformation;
  
  protected EClass eStaticClass()
  {
    return ChangePackage.Literals.CHANGE_DESCRIPTION;
  }
  
  public EMap<EObject, EList<FeatureChange>> getObjectChanges()
  {
    if (objectChanges == null) {
      objectChanges = new EcoreEMap(ChangePackage.Literals.EOBJECT_TO_CHANGES_MAP_ENTRY, EObjectToChangesMapEntryImpl.class, this, 0);
    }
    return objectChanges;
  }
  
  public EList<EObject> getObjectsToDetachGen()
  {
    if (objectsToDetach == null) {
      objectsToDetach = new EObjectEList(EObject.class, this, 1);
    }
    return objectsToDetach;
  }
  
  protected static List<EObject> getContainedEObjects(List<FeatureMap.Entry> featureMapEntries)
  {
    List<EObject> result = new ArrayList();
    for (FeatureMap.Entry entry : featureMapEntries)
    {
      EStructuralFeature feature = entry.getEStructuralFeature();
      if (((feature instanceof EReference)) && (((EReference)feature).isContainment())) {
        result.add((EObject)entry.getValue());
      }
    }
    return result;
  }
  
  public EList<EObject> getObjectsToDetach()
  {
    List<EObject> objectsBeforeChange = new UniqueEList.FastCompare();
    List<EObject> objectsAfterChange = new UniqueEList.FastCompare();
    Iterator localIterator1;
    EStructuralFeature feature;
    if (!getObjectChanges().isEmpty())
    {
      preApply(false);
      Iterator localIterator2;
      for (localIterator1 = getObjectChanges().iterator(); localIterator1.hasNext(); localIterator2.hasNext())
      {
        Map.Entry<EObject, EList<FeatureChange>> entry = (Map.Entry)localIterator1.next();
        
        EObject objectToChange = (EObject)entry.getKey();
        localIterator2 = ((EList)entry.getValue()).iterator(); continue;FeatureChange featureChange = (FeatureChange)localIterator2.next();
        
        feature = featureChange.getFeature();
        if ((feature != null) && (FeatureMapUtil.isFeatureMap(feature)))
        {
          List<FeatureMap.Entry> beforeValue = (List)featureChange.getValue();
          objectsBeforeChange.addAll(getContainedEObjects(beforeValue));
          
          List<FeatureMap.Entry> afterValue = (List)objectToChange.eGet(feature);
          objectsAfterChange.addAll(getContainedEObjects(afterValue));
        }
        else if (((feature instanceof EReference)) && (((EReference)feature).isContainment()))
        {
          if (feature.isMany())
          {
            List<EObject> beforeValue = (List)featureChange.getValue();
            objectsBeforeChange.addAll(beforeValue);
            List<EObject> afterValue = (List)objectToChange.eGet(feature);
            objectsAfterChange.addAll(afterValue);
          }
          else
          {
            Object value = featureChange.getValue();
            if (value != null) {
              objectsBeforeChange.add((EObject)value);
            }
            value = objectToChange.eGet(feature);
            if (value != null) {
              objectsAfterChange.add((EObject)value);
            }
          }
        }
      }
    }
    if (!getResourceChanges().isEmpty()) {
      for (ResourceChange resourceChange : getResourceChanges())
      {
        Resource resource = resourceChange.getResource();
        if (resource == null) {
          resource = eResource();
        }
        if (resource != null)
        {
          EList<EObject> currentContentCopy = new BasicEList(resource.getContents());
          for (ListChange listChange : resourceChange.getListChanges())
          {
            EList<Object> list = currentContentCopy;
            listChange.apply(list);
          }
          objectsBeforeChange.addAll(currentContentCopy);
          objectsAfterChange.addAll(resource.getContents());
        }
      }
    }
    objectsAfterChange.removeAll(objectsBeforeChange);
    
    getObjectsToDetachGen().retainAll(objectsAfterChange);
    getObjectsToDetachGen().addAll(objectsAfterChange);
    
    return getObjectsToDetachGen();
  }
  
  public EList<EObject> getObjectsToAttach()
  {
    if (objectsToAttach == null) {
      objectsToAttach = new EObjectContainmentEList(EObject.class, this, 2);
    }
    return objectsToAttach;
  }
  
  public EList<ResourceChange> getResourceChanges()
  {
    if (resourceChanges == null) {
      resourceChanges = new EObjectContainmentEList(ResourceChange.class, this, 3);
    }
    return resourceChanges;
  }
  
  public void apply()
  {
    preApply(false);
    Iterator localIterator2;
    for (Iterator localIterator1 = getObjectChanges().iterator(); localIterator1.hasNext(); localIterator2.hasNext())
    {
      Map.Entry<EObject, EList<FeatureChange>> entry = (Map.Entry)localIterator1.next();
      
      EObject objectToChange = (EObject)entry.getKey();
      localIterator2 = ((EList)entry.getValue()).iterator(); continue;FeatureChange featureChange = (FeatureChange)localIterator2.next();
      
      featureChange.apply(objectToChange);
    }
    for (ResourceChange resourceChange : getResourceChanges()) {
      resourceChange.apply();
    }
    getObjectsToAttach().clear();
    getObjectChanges().clear();
    getResourceChanges().clear();
    oldContainmentInformation = null;
  }
  
  public void applyAndReverse()
  {
    preApply(true);
    
    List<EObject> objectsBeforeApply = new UniqueEList.FastCompare();
    List<EObject> objectsAfterApply = new UniqueEList.FastCompare();
    Iterator localIterator2;
    for (Iterator localIterator1 = getObjectChanges().iterator(); localIterator1.hasNext(); localIterator2.hasNext())
    {
      Map.Entry<EObject, EList<FeatureChange>> entry = (Map.Entry)localIterator1.next();
      
      EObject objectToChange = (EObject)entry.getKey();
      localIterator2 = ((EList)entry.getValue()).iterator(); continue;FeatureChange featureChange = (FeatureChange)localIterator2.next();
      
      EStructuralFeature feature = featureChange.getFeature();
      
      int featureKind = 
      
        ((feature instanceof EReference)) && (((EReference)feature).isContainment()) ? 
        
        2 : feature.isMany() ? 1 : (feature != null) && (FeatureMapUtil.isFeatureMap(feature)) ? 3 : 
        0;
      switch (featureKind)
      {
      case 1: 
        List<EObject> beforeValue = (List)objectToChange.eGet(feature);
        objectsBeforeApply.addAll(beforeValue);
        break;
      case 2: 
        Object value = objectToChange.eGet(feature);
        if (value != null) {
          objectsBeforeApply.add((EObject)objectToChange.eGet(feature));
        }
        break;
      case 3: 
        List<FeatureMap.Entry> beforeValue = (List)objectToChange.eGet(feature);
        objectsBeforeApply.addAll(getContainedEObjects(beforeValue));
      }
      featureChange.applyAndReverse(objectToChange);
      switch (featureKind)
      {
      case 1: 
        List<EObject> afterVal
1 2 3 4 5

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd