Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2010-05-21 15:20:12 +0000
committerkhussey2010-05-21 15:20:12 +0000
commit722c6d5e4cb0fd516f3f6f88ba8fe028d720afe9 (patch)
treee0708282854ea9cde8063ec0c6cfcf00e257e499
parent79d39b19d07c3fa68c193c4d30e11108944bcf87 (diff)
downloadorg.eclipse.emf-722c6d5e4cb0fd516f3f6f88ba8fe028d720afe9.tar.gz
org.eclipse.emf-722c6d5e4cb0fd516f3f6f88ba8fe028d720afe9.tar.xz
org.eclipse.emf-722c6d5e4cb0fd516f3f6f88ba8fe028d720afe9.zip
[310835] Removing unnecessary comments and classes.
-rw-r--r--plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java68
-rw-r--r--plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java78
-rw-r--r--plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java86
3 files changed, 1 insertions, 231 deletions
diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java
deleted file mode 100644
index c026ca364..000000000
--- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEList_CustomFieldSerializer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: BasicEList_CustomFieldSerializer.java,v 1.1 2010/04/28 14:49:28 emerks Exp $
- */
-package org.eclipse.emf.common.util;
-
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.client.rpc.SerializationStreamReader;
-import com.google.gwt.user.client.rpc.SerializationStreamWriter;
-
-
-public final class BasicEList_CustomFieldSerializer
-{
- @SuppressWarnings("unchecked")
- public static <E> void deserialize(SerializationStreamReader reader, BasicEList<E> eList) throws SerializationException
- {
- reader.readObject();
-
- int arrayLength = reader.readInt();
- if (arrayLength > 0)
- {
- try
- {
- eList.data = eList.newData(arrayLength);
- }
- catch (Throwable exception)
- {
- eList.data = new Object[arrayLength];
- }
-
- for (int i = 0; i < eList.size; ++i)
- {
- eList.didAdd(i, eList.assign(i, (E) reader.readObject()));
- }
- }
- }
-
- public static <E> void serialize(SerializationStreamWriter writer, BasicEList<E> eList) throws SerializationException
- {
- writer.writeObject(eList);
-
- if (eList.data == null)
- {
- writer.writeInt(0);
- }
- else
- {
- writer.writeInt(eList.data.length);
- for (int i = 0; i < eList.size; ++i)
- {
- writer.writeObject(eList.data[i]);
- }
- }
- }
-}
-
diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java
index 65a7cb241..a10013822 100644
--- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java
+++ b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap.java
@@ -12,14 +12,11 @@
*
* </copyright>
*
- * $Id: BasicEMap.java,v 1.2 2010/04/28 20:37:42 khussey Exp $
+ * $Id: BasicEMap.java,v 1.3 2010/05/21 15:20:12 khussey Exp $
*/
package org.eclipse.emf.common.util;
-//import java.io.IOException;
-//import java.io.ObjectInputStream;
-//import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.AbstractCollection;
import java.util.AbstractSet;
@@ -1459,79 +1456,6 @@ public class BasicEMap<K, V> implements EMap<K, V>, Serializable
}
}
- // XXX 245014
-// private void writeObject(ObjectOutputStream objectOutputStream) throws IOException
-// {
-// objectOutputStream.defaultWriteObject();
-// writeEntries(objectOutputStream);
-// }
-
- // XXX 245014
-// protected void writeEntries(ObjectOutputStream objectOutputStream) throws IOException
-// {
-// objectOutputStream.writeInt(size);
-//
-// if (entryData == null)
-// {
-// objectOutputStream.writeInt(0);
-// }
-// else
-// {
-// // Write the capacity.
-// //
-// objectOutputStream.writeInt(entryData.length);
-//
-// // Write all the entryData; there will be size of them.
-// //
-// for (int i = 0; i < entryData.length; ++i)
-// {
-// BasicEList<Entry<K, V>> eList = entryData[i];
-// if (eList != null)
-// {
-// Object [] entries = eList.data;
-// int size = eList.size;
-// for (int j = 0; j < size; ++j)
-// {
-// @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j];
-// objectOutputStream.writeObject(entry.getKey());
-// objectOutputStream.writeObject(entry.getValue());
-// }
-// }
-// }
-// }
-// }
-
- // XXX 245014
-// private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException
-// {
-// objectInputStream.defaultReadObject();
-// readEntries(objectInputStream);
-// }
-
- // XXX 245014
-// protected void readEntries(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException
-// {
-// size = objectInputStream.readInt();
-// initializeDelegateEList();
-//
-// // Restore the capacity, if there was any.
-// //
-// int capacity = objectInputStream.readInt();
-// if (capacity > 0)
-// {
-// entryData = newEntryData(capacity);
-//
-// // Read all size number of entryData.
-// //
-// for (int i = 0; i < size; ++i)
-// {
-// @SuppressWarnings("unchecked") K key = (K)objectInputStream.readObject();
-// @SuppressWarnings("unchecked") V value = (V)objectInputStream.readObject();
-// put(key, value);
-// }
-// }
-// }
-
/**
* Delegates to {@link #delegateEList}.
*/
diff --git a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java b/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java
deleted file mode 100644
index 6dbb7cfb9..000000000
--- a/plugins/org.eclipse.emf.gwt.common/src/org/eclipse/emf/common/util/BasicEMap_CustomFieldSerializer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2010 Ed Merks and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Merks - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: BasicEMap_CustomFieldSerializer.java,v 1.1 2010/04/28 14:49:30 emerks Exp $
- */
-package org.eclipse.emf.common.util;
-
-import org.eclipse.emf.common.util.BasicEMap.Entry;
-
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.client.rpc.SerializationStreamReader;
-import com.google.gwt.user.client.rpc.SerializationStreamWriter;
-
-public final class BasicEMap_CustomFieldSerializer
-{
- @SuppressWarnings("unchecked")
- public static <K, V> void deserialize(SerializationStreamReader reader, BasicEMap<K, V> eMap) throws SerializationException
- {
- reader.readObject();
-
- eMap.size = reader.readInt();
- eMap.initializeDelegateEList();
-
- // Restore the capacity, if there was any.
- //
- int capacity = reader.readInt();
- if (capacity > 0)
- {
- eMap.entryData = eMap.newEntryData(capacity);
-
- // Read all size number of entryData.
- //
- for (int i = 0; i < eMap.size; ++i)
- {
- eMap.put((K)reader.readObject(), (V)reader.readObject());
- }
- }
- }
-
- public static <K, V> void serialize(SerializationStreamWriter writer, BasicEMap<K, V> eMap) throws SerializationException
- {
- writer.writeObject(eMap);
-
- writer.writeInt(eMap.size);
- if (eMap.entryData == null)
- {
- writer.writeInt(0);
- }
- else
- {
- // Write the capacity.
- //
- writer.writeInt(eMap.entryData.length);
-
- // Write all the entryData; there will be size of them.
- //
- for (int i = 0; i < eMap.entryData.length; ++i)
- {
- BasicEList<Entry<K, V>> eList = eMap.entryData[i];
- if (eList != null)
- {
- Object [] entries = eList.data;
- int size = eList.size;
- for (int j = 0; j < size; ++j)
- {
- @SuppressWarnings("unchecked")
- Entry<Object, Object> entry = (Entry<Object, Object>)entries[j];
- writer.writeObject(entry.getKey());
- writer.writeObject(entry.getValue());
- }
- }
- }
- }
- }
-}

Back to the top