Add some shell creators.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:13 +0000 (14:42 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Oct 2010 12:42:13 +0000 (14:42 +0200)
src/main/java/net/pterodactylus/sone/data/PostShell.java
src/main/java/net/pterodactylus/sone/data/ReplyShell.java
src/main/java/net/pterodactylus/sone/data/SoneShell.java

index df66b20..7bcddfa 100644 (file)
@@ -30,6 +30,15 @@ import java.util.UUID;
  */
 public class PostShell extends Post implements Shell<Post> {
 
+       /** The shell creator. */
+       public static final ShellCreator<Post> creator = new ShellCreator<Post>() {
+
+               @Override
+               public Shell<Post> createShell() {
+                       return new PostShell();
+               }
+       };
+
        /** The GUID of the post. */
        private UUID id;
 
index 03a4c53..11a6ee5 100644 (file)
@@ -27,6 +27,15 @@ import java.util.UUID;
  */
 public class ReplyShell extends Reply implements Shell<Reply> {
 
+       /** The shell creator. */
+       public static final ShellCreator<Reply> creator = new ShellCreator<Reply>() {
+
+               @Override
+               public Shell<Reply> createShell() {
+                       return new ReplyShell();
+               }
+       };
+
        /** The Sone that posted this reply. */
        private Sone sone;
 
index 50b1189..49059c7 100644 (file)
@@ -33,6 +33,15 @@ import freenet.keys.FreenetURI;
  */
 public class SoneShell extends Sone implements Shell<Sone> {
 
+       /** The shell creator. */
+       public static final ShellCreator<Sone> creator = new ShellCreator<Sone>() {
+
+               @Override
+               public Shell<Sone> createShell() {
+                       return new SoneShell();
+               }
+       };
+
        /** A GUID for this Sone. */
        private UUID id;