Home | History | Annotate | Download | only in io
      1 package tests.api.java.io;
      2 
      3 public class SerializationTestClass implements java.io.Serializable {
      4 
      5     // Test class names
      6     public class TestClassName1 implements java.io.Serializable {
      7     }
      8 
      9     public class TestClassName2T_T$T implements java.io.Serializable {
     10     }
     11 
     12     // Test Modifiers
     13     public class TestClassModifierPublic implements java.io.Serializable {
     14     }
     15 
     16     interface TestClassModifierInterfaceHelper extends java.io.Serializable {
     17     }
     18 
     19     public class TestClassModifierInterface implements
     20             TestClassModifierInterfaceHelper {
     21     }
     22 
     23     final class TestClassModifierFinal implements java.io.Serializable {
     24     }
     25 
     26     abstract class TestClassModifierAbstractHelper implements
     27             java.io.Serializable {
     28     }
     29 
     30     public class TestClassModifierAbstract extends
     31             TestClassModifierAbstractHelper {
     32     }
     33 
     34 
     35     // TODO Arrays always are abstract
     36 
     37     // TODO Non public interface has no abstract modifier
     38 
     39 
     40     // Test interfaces
     41     interface A extends java.io.Serializable {
     42     }
     43 
     44     interface B extends java.io.Serializable {
     45     }
     46 
     47     interface C extends A {
     48     }
     49 
     50     public class TestIntefaces implements java.io.Serializable {
     51     }
     52 
     53     public class TestIntefacesA implements A {
     54     }
     55 
     56     public class TestIntefacesAB implements A, B {
     57     }
     58 
     59     public class TestIntefacesBA implements B, A {
     60     }
     61 
     62     public class TestIntefacesC implements C {
     63     }
     64 
     65     public class TestIntefacesAC implements A, C {
     66     }
     67 
     68     public class TestIntefacesCA implements C, A {
     69     }
     70 
     71     public class TestIntefacesABC implements A, B, C {
     72     }
     73 
     74     public class TestIntefacesACB implements A, C, B {
     75     }
     76 
     77     public class TestIntefacesBAC implements B, A, C {
     78     }
     79 
     80     public class TestIntefacesBCA implements B, C, A {
     81     }
     82 
     83     public class TestIntefacesCAB implements C, A, B {
     84     }
     85 
     86     public class TestIntefacesCBA implements C, B, A {
     87     }
     88 
     89     /**
     90      * Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED | Modifier.STATIC |
     91      * Modifier.FINAL | Modifier.VOLATILE | Modifier.TRANSIENT
     92      */
     93     // Test Fields
     94     public class TestFieldsNone implements java.io.Serializable {
     95     }
     96 
     97     public class TestFieldsOnePublic implements java.io.Serializable {
     98         public int one;
     99     }
    100 
    101     public class TestFieldsTwoPublic implements java.io.Serializable {
    102         public int one;
    103         public int two;
    104     }
    105 
    106     @SuppressWarnings("unused")
    107     public class TestFieldsOnePrivate implements java.io.Serializable {
    108         private int one;
    109     }
    110 
    111     @SuppressWarnings("unused")
    112     public class TestFieldsTwoPrivate implements java.io.Serializable {
    113         private int one;
    114         private int two;
    115     }
    116 
    117     public class TestFieldsOneProtected implements java.io.Serializable {
    118         protected int one;
    119     }
    120 
    121     public class TestFieldsTwoProtected implements java.io.Serializable {
    122         protected int one;
    123         protected int two;
    124     }
    125 
    126     public static class TestFieldsOneStatic implements java.io.Serializable {
    127         static int one;
    128     }
    129 
    130     public static class TestFieldsTwoStatic implements java.io.Serializable {
    131         static int one;
    132         static int two;
    133     }
    134 
    135     public class TestFieldsOneFinal implements java.io.Serializable {
    136         final int one = 0;
    137     }
    138 
    139     public class TestFieldsTwoFinal implements java.io.Serializable {
    140         final int one = 0;
    141         final int two = 0;
    142     }
    143 
    144     public class TestFieldsOneVolatile implements java.io.Serializable {
    145         volatile int one;
    146     }
    147 
    148     public class TestFieldsTwoVolatile implements java.io.Serializable {
    149         volatile int one;
    150         volatile int two;
    151     }
    152 
    153     public class TestFieldsOneTransient implements java.io.Serializable {
    154         transient int one;
    155     }
    156 
    157     public class TestFieldsTwoTransient implements java.io.Serializable {
    158         transient int one;
    159         transient int two;
    160     }
    161 
    162     public class TestFieldSignatures implements java.io.Serializable {
    163         Object l;
    164         int i;
    165         short s;
    166         long j;
    167         boolean z;
    168         char c;
    169         double d;
    170         float f;
    171         byte b;
    172     }
    173 
    174 
    175     // Test Constructors
    176     public class TestConstructorNone implements java.io.Serializable {
    177     }
    178 
    179     public class TestConstructorOne implements java.io.Serializable {
    180         public TestConstructorOne() {
    181         }
    182     }
    183 
    184     public class TestConstructorTwo implements java.io.Serializable {
    185         public TestConstructorTwo(byte b) {
    186         }
    187 
    188         public TestConstructorTwo(char c) {
    189         }
    190     }
    191 
    192     public class TestConstructorTwoReverse implements java.io.Serializable {
    193         public TestConstructorTwoReverse(char c) {
    194         }
    195 
    196         public TestConstructorTwoReverse(byte b) {
    197         }
    198     }
    199 
    200 
    201     // Test Constructor Modifiers
    202     public class TestConstructorPublic implements java.io.Serializable {
    203         public TestConstructorPublic() {
    204         }
    205     }
    206 
    207     public class TestConstructorPrivate implements java.io.Serializable {
    208         private TestConstructorPrivate() {
    209         }
    210 
    211         public TestConstructorPrivate(int i) {
    212             this();
    213         }
    214     }
    215 
    216     public class TestConstructorProtected implements java.io.Serializable {
    217         protected TestConstructorProtected() {
    218         }
    219     }
    220     // TODO constructor modifier strict?
    221     // TODO constructor modifier static?
    222     // TODO constructor modifier final?
    223     // TODO constructor modifier synchronized?
    224     // TODO constructor modifier native?
    225     // TODO constructor modifier abstract?
    226 
    227 
    228     // Test constructor signature
    229     public class TestConstructorSignature implements java.io.Serializable {
    230         public TestConstructorSignature(boolean z, byte b, char c, short s,
    231                 int i, float f, double j, Object l) {
    232         }
    233     }
    234 
    235 
    236     // Test Method Modifiers
    237     public class TestMethodPublic implements java.io.Serializable {
    238         public void method() {
    239         }
    240     }
    241 
    242     @SuppressWarnings("unused")
    243     public class TestMehodPrivate implements java.io.Serializable {
    244         private void method() {
    245         }
    246     }
    247 
    248     public class TestMethodProtected implements java.io.Serializable {
    249         protected void method() {
    250         }
    251     }
    252 
    253     public class TestMethodStrict implements java.io.Serializable {
    254         strictfp void method() {
    255         }
    256     }
    257 
    258     public static class TestMethodStatic implements java.io.Serializable {
    259         static void method() {
    260         }
    261     }
    262 
    263     public class TestMethodFinal implements java.io.Serializable {
    264         final void method() {
    265         }
    266     }
    267 
    268     public class TestMethodSynchronized implements java.io.Serializable {
    269         synchronized void method() {
    270         }
    271     }
    272 
    273     public class TestMethodNative implements java.io.Serializable {
    274         native void method();
    275     }
    276 
    277     public abstract class TestMethodAbstractHelper implements
    278             java.io.Serializable {
    279         abstract void method();
    280     }
    281 
    282     public class TestMethodAbstract extends TestMethodAbstractHelper implements
    283             java.io.Serializable {
    284         @Override
    285         void method() {
    286         }
    287     }
    288 
    289 
    290     // Test method signature
    291     public class TestMethodSignature implements java.io.Serializable {
    292         public void method(boolean z, byte b, char c, short s, int i, float f,
    293                 double j, Object l) {
    294         }
    295     }
    296 
    297 
    298     // Test method return signature
    299     public class TestMethodReturnSignature implements java.io.Serializable {
    300         public void methodV() {
    301         }
    302 
    303         public boolean methodZ() {
    304             return false;
    305         }
    306 
    307         public byte methodB() {
    308             return 0;
    309         }
    310 
    311         public char methodC() {
    312             return '0';
    313         }
    314 
    315         public short methodS() {
    316             return 0;
    317         }
    318 
    319         public int methodI() {
    320             return 0;
    321         }
    322 
    323         public float methodF() {
    324             return 0F;
    325         }
    326 
    327         public double methodD() {
    328             return 0D;
    329         }
    330 
    331         public Object methodL() {
    332             return null;
    333         }
    334     }
    335 }
    336