@@ -0,0 +1,1668 @@
+package org.simpleframework.xml.core;%0D%0A%0D%0Aimport java.lang.annotation.Retention;%0D%0Aimport java.lang.annotation.RetentionPolicy;%0D%0Aimport java.util.List;%0D%0A%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0Aimport org.simpleframework.xml.Default;%0D%0Aimport org.simpleframework.xml.ElementList;%0D%0Aimport org.simpleframework.xml.Root;%0D%0A%0D%0Apublic class VariantTest extends TestCase %7B%0D%0A   private static final String SOURCE = %0D%0A      %22%3CvariantExample%3E%22 +%0D%0A      %22  %3Ca/%3E%22 +%0D%0A      %22  %3Cb/%3E%22 +%0D%0A      %22  %3Cc/%3E%22 +%0D%0A      %22%3C/variantExample%3E%22;%0D%0A   %0D%0A   @Retention(RetentionPolicy.RUNTIME)%0D%0A   public static @interface Variant %7B%0D%0A      public Class%5B%5D value();%0D%0A   %7D%0D%0A   @Root(name=%22a%22)%0D%0A   public static class A implements DynamicEntry %7B%0D%0A      public String foo()%7B%0D%0A         return %22a%22;%0D%0A      %7D%0D%0A   %7D%0D%0A   @Root(name=%22b%22)%0D%0A   public static class B implements DynamicEntry %7B%0D%0A      public String foo() %7B%0D%0A         return %22b%22;%0D%0A      %7D%0D%0A   %7D%0D%0A   @Root(name=%22c%22)%0D%0A   public static class C implements DynamicEntry %7B%0D%0A      public String foo() %7B%0D%0A         return %22c%22;%0D%0A      %7D%0D%0A   %7D%0D%0A   @Variant(%7BA.class, B.class, C.class%7D)%0D%0A   public static interface DynamicEntry %7B%0D%0A      public String foo();%0D%0A   %7D%0D%0A   @Default%0D%0A   public static class VariantExample %7B%0D%0A      @ElementList(inline=true)%0D%0A      private List%3CDynamicEntry%3E list;%0D%0A   %7D%0D%0A   public void testVariant() throws Exception %7B%0D%0A      Persister persister = new Persister();%0D%0A      VariantExample example = persister.read(VariantExample.class, SOURCE);%0D%0A      assertEquals(example.list.get(0).getClass(), A.class);%0D%0A      assertEquals(example.list.get(1).getClass(), B.class);%0D%0A      assertEquals(example.list.get(2).getClass(), C.class);%0D%0A   %7D%0D%0A%0D%0A%7D%0D%0A

Add example of variants