summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-02-07 13:07:33 +0000
committermichelou <michelou@epfl.ch>2007-02-07 13:07:33 +0000
commit29162dae261e4fd3281a2b0e4eccda55f58db144 (patch)
tree255368dc92c5180dd83f109b81e64ddf7eec8e47 /src
parent15d4afe9ebe876f6630ff6718677776b1960c9b0 (diff)
downloadscala-29162dae261e4fd3281a2b0e4eccda55f58db144.tar.gz
scala-29162dae261e4fd3281a2b0e4eccda55f58db144.tar.bz2
scala-29162dae261e4fd3281a2b0e4eccda55f58db144.zip
added missing file headers
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/Attribute.scala14
-rw-r--r--src/library/scala/ClassfileAttribute.scala11
-rw-r--r--src/library/scala/StaticAttribute.scala11
-rw-r--r--src/library/scala/ref/PhantomReference.scala7
-rw-r--r--src/library/scala/ref/Reference.scala29
-rw-r--r--src/library/scala/ref/ReferenceQueue.scala31
-rw-r--r--src/library/scala/ref/ReferenceWrapper.scala31
-rw-r--r--src/library/scala/ref/SoftReference.scala15
-rw-r--r--src/library/scala/ref/WeakReference.scala23
9 files changed, 122 insertions, 50 deletions
diff --git a/src/library/scala/Attribute.scala b/src/library/scala/Attribute.scala
index 869800458d..4762e2cdf4 100644
--- a/src/library/scala/Attribute.scala
+++ b/src/library/scala/Attribute.scala
@@ -1,7 +1,7 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
@@ -11,10 +11,12 @@
package scala
-/** <p>A base class for attributes. Atributes extending this class directly
- * are not preserved for the Scala type checker and are also not stored as
- * Java annotations in classfiles. To enable either or both of these, one needs to
- * inherit from <code>StaticAttribute</code> or/and <code>ClassfileAttribute</code>.
+/** <p>
+ * A base class for attributes. Atributes extending this class directly
+ * are not preserved for the Scala type checker and are also not stored
+ * as Java annotations in classfiles. To enable either or both of these,
+ * one needs to inherit from <code>StaticAttribute</code> or/and
+ * <a href="ClassfileAttribute.html"><code>ClassfileAttribute</code></a>.
* </p>
*
* @author Martin Odersky
diff --git a/src/library/scala/ClassfileAttribute.scala b/src/library/scala/ClassfileAttribute.scala
index f505906d80..51c889688b 100644
--- a/src/library/scala/ClassfileAttribute.scala
+++ b/src/library/scala/ClassfileAttribute.scala
@@ -1,18 +1,19 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
-// $Id: Attribute.scala 8926 2006-10-11 09:58:51 +0000 (Wed, 11 Oct 2006) dragos $
+// $Id$
package scala
-/** <p>A base class for classfile attributes. These are stored as
- * Java annotations in classfiles.
+/** <p>
+ * A base class for classfile attributes. These are stored as
+ * Java annotations in classfiles.
* </p>
*
* @author Martin Odersky
diff --git a/src/library/scala/StaticAttribute.scala b/src/library/scala/StaticAttribute.scala
index 8b4815472b..1ad88faeac 100644
--- a/src/library/scala/StaticAttribute.scala
+++ b/src/library/scala/StaticAttribute.scala
@@ -1,18 +1,19 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
\* */
-// $Id: Attribute.scala 8926 2006-10-11 09:58:51 +0000 (Wed, 11 Oct 2006) dragos $
+// $Id$
package scala
-/** <p>A base class for static attributes. These are available
- * to the Scala typechecker, even across different compilation units.
+/** <p>
+ * A base class for static attributes. These are available
+ * to the Scala type checker, even across different compilation units.
* </p>
*
* @author Martin Odersky
diff --git a/src/library/scala/ref/PhantomReference.scala b/src/library/scala/ref/PhantomReference.scala
index 39eb754081..20cd1fa093 100644
--- a/src/library/scala/ref/PhantomReference.scala
+++ b/src/library/scala/ref/PhantomReference.scala
@@ -1,6 +1,6 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2003-2007, LAMP/EPFL **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
@@ -10,6 +10,9 @@
package scala.ref
-class PhantomReference[+T <: AnyRef](value : T, queue : ReferenceQueue[T]) extends ReferenceWrapper[T] {
+/**
+ * @author Sean McDirmid
+ */
+class PhantomReference[+T <: AnyRef](value: T, queue: ReferenceQueue[T]) extends ReferenceWrapper[T] {
val underlying = new java.lang.ref.PhantomReference(value, queue.underlying)
}
diff --git a/src/library/scala/ref/Reference.scala b/src/library/scala/ref/Reference.scala
index 30ace06b31..f59964de72 100644
--- a/src/library/scala/ref/Reference.scala
+++ b/src/library/scala/ref/Reference.scala
@@ -1,11 +1,24 @@
-package scala.ref;
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+// $Id$
+
+package scala.ref
+
+/**
+ * @author Sean McDirmid
+ */
trait Reference[+T <: AnyRef] extends Function0[T] {
- def isValid : Boolean;
- def apply() : T;
- def get = if (!isValid) None else Some(apply());
- override def toString = if (!isValid) "<deleted>" else apply().toString;
- def clear : Unit;
- def enqueue : Boolean;
- def isEnqueued : Boolean;
+ def isValid: Boolean
+ def apply(): T
+ def get = if (!isValid) None else Some(apply())
+ override def toString = if (!isValid) "<deleted>" else apply().toString
+ def clear: Unit
+ def enqueue: Boolean
+ def isEnqueued: Boolean
}
diff --git a/src/library/scala/ref/ReferenceQueue.scala b/src/library/scala/ref/ReferenceQueue.scala
index 1ed4c20af3..5f2d7a20ec 100644
--- a/src/library/scala/ref/ReferenceQueue.scala
+++ b/src/library/scala/ref/ReferenceQueue.scala
@@ -1,14 +1,27 @@
-package scala.ref;
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+// $Id$
+
+package scala.ref
+
+/**
+ * @author Sean McDirmid
+ */
class ReferenceQueue[+T <: AnyRef] {
- private[ref] val underlying = new java.lang.ref.ReferenceQueue;
+ private[ref] val underlying = new java.lang.ref.ReferenceQueue
override def toString = underlying.toString;
- class Wrapper(val underlying : java.lang.ref.Reference) extends ReferenceWrapper[T];
- def Wrapper(ref : java.lang.ref.Reference) = ref match {
- case null => None;
- case ref => new Wrapper(ref);
+ class Wrapper(val underlying: java.lang.ref.Reference) extends ReferenceWrapper[T]
+ def Wrapper(ref: java.lang.ref.Reference) = ref match {
+ case null => None
+ case ref => new Wrapper(ref)
}
- def poll = Wrapper(underlying.poll);
- def remove = Wrapper(underlying.remove);
- def remove(timeout : Long) = Wrapper(underlying.remove(timeout));
+ def poll = Wrapper(underlying.poll)
+ def remove = Wrapper(underlying.remove)
+ def remove(timeout: Long) = Wrapper(underlying.remove(timeout))
}
diff --git a/src/library/scala/ref/ReferenceWrapper.scala b/src/library/scala/ref/ReferenceWrapper.scala
index 95f0047efe..4546f4d8fd 100644
--- a/src/library/scala/ref/ReferenceWrapper.scala
+++ b/src/library/scala/ref/ReferenceWrapper.scala
@@ -1,14 +1,27 @@
-package scala.ref;
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+// $Id$
+
+package scala.ref
+
+/**
+ * @author Seam McDirmid
+ */
trait ReferenceWrapper[+T <: AnyRef] extends Reference[T] {
- val underlying : java.lang.ref.Reference;
- def isValid = underlying.get != null;
+ val underlying: java.lang.ref.Reference
+ def isValid = underlying.get != null
def apply() = {
- val ret = underlying.get.asInstanceOf[T];
- if (ret eq null) throw new NoSuchElementException;
- ret;
+ val ret = underlying.get.asInstanceOf[T]
+ if (ret eq null) throw new NoSuchElementException
+ ret
}
- def clear = underlying.clear;
- def enqueue = underlying.enqueue;
- def isEnqueued = underlying.isEnqueued;
+ def clear = underlying.clear
+ def enqueue = underlying.enqueue
+ def isEnqueued = underlying.isEnqueued
}
diff --git a/src/library/scala/ref/SoftReference.scala b/src/library/scala/ref/SoftReference.scala
index a19ae08f5d..8c6622c7e9 100644
--- a/src/library/scala/ref/SoftReference.scala
+++ b/src/library/scala/ref/SoftReference.scala
@@ -1,5 +1,18 @@
-package scala.ref;
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+// $Id$
+
+package scala.ref
+
+/**
+ * @author Sean McDirmid
+ */
class SoftReference[+T <: AnyRef](value : T, queue : ReferenceQueue[T]) extends ReferenceWrapper[T] {
def this(value : T) = this(value, null);
val underlying =
diff --git a/src/library/scala/ref/WeakReference.scala b/src/library/scala/ref/WeakReference.scala
index 6a27bda409..bde3a6c4fa 100644
--- a/src/library/scala/ref/WeakReference.scala
+++ b/src/library/scala/ref/WeakReference.scala
@@ -1,8 +1,21 @@
-package scala.ref;
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
-class WeakReference[+T <: AnyRef](value : T, queue : ReferenceQueue[T]) extends ReferenceWrapper[T] {
- def this(value : T) = this(value, null);
+// $Id$
+
+package scala.ref
+
+/**
+ * @author Sean McDirmid
+ */
+class WeakReference[+T <: AnyRef](value: T, queue: ReferenceQueue[T]) extends ReferenceWrapper[T] {
+ def this(value: T) = this(value, null)
val underlying =
- if (queue == null) new java.lang.ref.WeakReference(value);
- else new java.lang.ref.WeakReference(value, queue.underlying);
+ if (queue == null) new java.lang.ref.WeakReference(value)
+ else new java.lang.ref.WeakReference(value, queue.underlying)
}