diff options
author | Lex Spoon <lex@lexspoon.org> | 2013-06-26 16:58:32 -0400 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2013-06-26 18:10:25 -0400 |
commit | 930b36d5fa63ecdeed4b180b84db4c792a49d3e8 (patch) | |
tree | 52dac1881e228653300aef0b48612d7090e7d63b /src/library | |
parent | be02dff1ace3b0c7aef2b0260b65dc7d03db749d (diff) | |
download | scala-930b36d5fa63ecdeed4b180b84db4c792a49d3e8.tar.gz scala-930b36d5fa63ecdeed4b180b84db4c792a49d3e8.tar.bz2 scala-930b36d5fa63ecdeed4b180b84db4c792a49d3e8.zip |
Seals some case class hierarchies.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/xml/dtd/Decl.scala | 10 | ||||
-rw-r--r-- | src/library/scala/xml/dtd/ExternalID.scala | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/library/scala/xml/dtd/Decl.scala b/src/library/scala/xml/dtd/Decl.scala index e6804478bd..8bf859c460 100644 --- a/src/library/scala/xml/dtd/Decl.scala +++ b/src/library/scala/xml/dtd/Decl.scala @@ -12,9 +12,9 @@ package dtd import Utility.sbToString -abstract class Decl +sealed abstract class Decl -abstract class MarkupDecl extends Decl { +sealed abstract class MarkupDecl extends Decl { def buildString(sb: StringBuilder): StringBuilder } @@ -52,7 +52,7 @@ case class AttrDecl(name: String, tpe: String, default: DefaultDecl) { } /** an entity declaration */ -abstract class EntityDecl extends MarkupDecl +sealed abstract class EntityDecl extends MarkupDecl /** a parsed general entity declaration */ case class ParsedEntityDecl(name: String, entdef: EntityDef) extends EntityDecl { @@ -85,7 +85,7 @@ case class NotationDecl( name:String, extID:ExternalID ) extends MarkupDecl { } } -abstract class EntityDef { +sealed abstract class EntityDef { def buildString(sb: StringBuilder): StringBuilder } @@ -133,7 +133,7 @@ case class PEReference(ent:String) extends MarkupDecl { // default declarations for attributes -abstract class DefaultDecl { +sealed abstract class DefaultDecl { override def toString(): String def buildString(sb: StringBuilder): StringBuilder } diff --git a/src/library/scala/xml/dtd/ExternalID.scala b/src/library/scala/xml/dtd/ExternalID.scala index 5a1b5d1a19..880633d860 100644 --- a/src/library/scala/xml/dtd/ExternalID.scala +++ b/src/library/scala/xml/dtd/ExternalID.scala @@ -15,7 +15,7 @@ package dtd * * @author Burak Emir */ -abstract class ExternalID extends parsing.TokenTests { +sealed abstract class ExternalID extends parsing.TokenTests { def quoted(s: String) = { val c = if (s contains '"') '\'' else '"' c + s + c |