Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipe Mulet2001-06-27 11:27:24 +0000
committerPhilipe Mulet2001-06-27 11:27:24 +0000
commit6a230a9d6ae1a4a6adbf38879cb9ee685eccffe9 (patch)
treee05b8ab1235babd084ed8b274999d167d939ae44 /org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java
parentb04602938404af4f8569a399fb36a5018768a262 (diff)
downloadeclipse.jdt.core-6a230a9d6ae1a4a6adbf38879cb9ee685eccffe9.tar.gz
eclipse.jdt.core-6a230a9d6ae1a4a6adbf38879cb9ee685eccffe9.tar.xz
eclipse.jdt.core-6a230a9d6ae1a4a6adbf38879cb9ee685eccffe9.zip
externalization in progress
Diffstat (limited to 'org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java')
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java99
1 files changed, 47 insertions, 52 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java
index 4f5e39e3eb..695d196753 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/impl/BinaryOutput.java
@@ -14,57 +14,52 @@ import org.eclipse.jdt.internal.core.builder.IType;
public abstract class BinaryOutput {
private static final boolean COMPUTE_CRC = false; // disabled since unused
- /**
- * Stores the binary in a manner specific to this BinaryOutput.
- */
- abstract protected void basicPutBinary(
- TypeStructureEntry tsEntry,
- byte[] binary,
- int crc);
- /**
- * Computes a 32-bit CRC on the given binary.
- */
- int crc32(byte[] binary) {
- java.util.zip.CRC32 crc = new java.util.zip.CRC32();
- crc.update(binary);
- return (int) crc.getValue();
- }
-
- /**
- * Deletes the binary previously produced for a type.
- */
- public abstract void deleteBinary(IType type);
- /**
- * Garbage collect any resources maintained by this binary
- * output which are no longer needed, given the states which
- * are still in use.
- */
- public abstract void garbageCollect(IState[] statesInUse);
- /**
- * Returns the binary previously produced for a type.
- * Returns null if the binary could not be found.
- */
- public abstract byte[] getBinary(TypeStructureEntry tsEntry, IType type);
- /**
- * Stores the binary produced by compiling a type.
- */
- public void putBinary(TypeStructureEntry tsEntry, byte[] binary) {
- /* store crc in type structure entry */
- int crc;
-
- if (COMPUTE_CRC) {
- crc = crc32(binary);
- tsEntry.setCRC32(crc);
- } else {
- crc = 0;
- }
-
- /* store binary */
- basicPutBinary(tsEntry, binary, crc);
+/**
+ * Stores the binary in a manner specific to this BinaryOutput.
+ */
+abstract protected void basicPutBinary(TypeStructureEntry tsEntry, byte[] binary, int crc);
+/**
+ * Computes a 32-bit CRC on the given binary.
+ */
+int crc32(byte[] binary) {
+ java.util.zip.CRC32 crc = new java.util.zip.CRC32();
+ crc.update(binary);
+ return (int) crc.getValue();
+}
+/**
+ * Deletes the binary previously produced for a type.
+ */
+public abstract void deleteBinary(IType type);
+/**
+ * Garbage collect any resources maintained by this binary
+ * output which are no longer needed, given the states which
+ * are still in use.
+ */
+public abstract void garbageCollect(IState[] statesInUse);
+/**
+ * Returns the binary previously produced for a type.
+ * Returns null if the binary could not be found.
+ */
+public abstract byte[] getBinary(TypeStructureEntry tsEntry, IType type);
+/**
+ * Stores the binary produced by compiling a type.
+ */
+public void putBinary(TypeStructureEntry tsEntry, byte[] binary) {
+ /* store crc in type structure entry */
+ int crc;
+
+ if (COMPUTE_CRC){
+ crc = crc32(binary);
+ tsEntry.setCRC32(crc);
+ } else {
+ crc = 0;
}
-
- /**
- * Deletes everything in this binary output.
- */
- public abstract void scrubOutput();
+
+ /* store binary */
+ basicPutBinary(tsEntry, binary, crc);
+}
+/**
+ * Deletes everything in this binary output.
+ */
+public abstract void scrubOutput();
}

Back to the top