All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.objectfabric.SerializationTestWriter Maven / Gradle / Ivy

There is a newer version: 0.9.1
Show newest version
/**
 * This file is part of ObjectFabric (http://objectfabric.org).
 *
 * ObjectFabric is licensed under the Apache License, Version 2.0, the terms
 * of which may be found at http://www.apache.org/licenses/LICENSE-2.0.html.
 * 
 * Copyright ObjectFabric Inc.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

package org.objectfabric;

//==============================================================================
//                                                                              
//  THIS FILE HAS BEEN GENERATED BY OBJECTFABRIC                                
//                                                                              
//==============================================================================

public class SerializationTestWriter extends org.objectfabric.SerializationTest.TestWriter {

    private int _index;

    @Override
    public void run() {
        for (;;) {
            switch (_index) {
                case 0: {
                    if (!canWriteBoolean())
                        return;

                    writeBoolean(false);
                    break;
                }
                case 1: {
                    if (!canWriteBoolean())
                        return;

                    writeBoolean(true);
                    break;
                }
                case 2: {
                    if (!canWriteBooleanBoxed())
                        return;

                    writeBooleanBoxed(null);
                    break;
                }
                case 3: {
                    if (!canWriteBooleanBoxed())
                        return;

                    writeBooleanBoxed(Boolean.TRUE);
                    break;
                }
                case 4: {
                    if (!canWriteBooleanBoxed())
                        return;

                    writeBooleanBoxed(Boolean.FALSE);
                    break;
                }
                case 5: {
                    if (!canWriteByte())
                        return;

                    writeByte(((byte) 0));
                    break;
                }
                case 6: {
                    if (!canWriteByte())
                        return;

                    writeByte(java.lang.Byte.MAX_VALUE);
                    break;
                }
                case 7: {
                    if (!canWriteByte())
                        return;

                    writeByte(java.lang.Byte.MIN_VALUE);
                    break;
                }
                case 8: {
                    if (!canWriteByteBoxed())
                        return;

                    writeByteBoxed(null);
                    break;
                }
                case 9: {
                    if (!canWriteCharacter())
                        return;

                    writeCharacter('\0');
                    break;
                }
                case 10: {
                    if (!canWriteCharacter())
                        return;

                    writeCharacter(java.lang.Character.MAX_VALUE);
                    break;
                }
                case 11: {
                    if (!canWriteCharacter())
                        return;

                    writeCharacter(java.lang.Character.MIN_VALUE);
                    break;
                }
                case 12: {
                    if (!canWriteCharacterBoxed())
                        return;

                    writeCharacterBoxed(null);
                    break;
                }
                case 13: {
                    if (!canWriteShort())
                        return;

                    writeShort(((short) 0));
                    break;
                }
                case 14: {
                    if (!canWriteShort())
                        return;

                    writeShort(java.lang.Short.MAX_VALUE);
                    break;
                }
                case 15: {
                    if (!canWriteShort())
                        return;

                    writeShort(java.lang.Short.MIN_VALUE);
                    break;
                }
                case 16: {
                    if (!canWriteShortBoxed())
                        return;

                    writeShortBoxed(null);
                    break;
                }
                case 17: {
                    if (!canWriteInteger())
                        return;

                    writeInteger(0);
                    break;
                }
                case 18: {
                    if (!canWriteInteger())
                        return;

                    writeInteger(java.lang.Integer.MAX_VALUE);
                    break;
                }
                case 19: {
                    if (!canWriteInteger())
                        return;

                    writeInteger(java.lang.Integer.MIN_VALUE);
                    break;
                }
                case 20: {
                    if (!canWriteIntegerBoxed())
                        return;

                    writeIntegerBoxed(null);
                    break;
                }
                case 21: {
                    if (!canWriteLong())
                        return;

                    writeLong(0);
                    break;
                }
                case 22: {
                    if (!canWriteLong())
                        return;

                    writeLong(java.lang.Long.MAX_VALUE);
                    break;
                }
                case 23: {
                    if (!canWriteLong())
                        return;

                    writeLong(java.lang.Long.MIN_VALUE);
                    break;
                }
                case 24: {
                    if (!canWriteLongBoxed())
                        return;

                    writeLongBoxed(null);
                    break;
                }
                case 25: {
                    if (!canWriteFloat())
                        return;

                    writeFloat(0);
                    break;
                }
                case 26: {
                    if (!canWriteFloat())
                        return;

                    writeFloat(java.lang.Float.MAX_VALUE);
                    break;
                }
                case 27: {
                    if (!canWriteFloat())
                        return;

                    writeFloat(java.lang.Float.MIN_VALUE);
                    break;
                }
                case 28: {
                    if (!canWriteFloatBoxed())
                        return;

                    writeFloatBoxed(null);
                    break;
                }
                case 29: {
                    if (!canWriteDouble())
                        return;

                    writeDouble(0);
                    break;
                }
                case 30: {
                    if (!canWriteDouble())
                        return;

                    writeDouble(java.lang.Double.MAX_VALUE);
                    break;
                }
                case 31: {
                    if (!canWriteDouble())
                        return;

                    writeDouble(java.lang.Double.MIN_VALUE);
                    break;
                }
                case 32: {
                    if (!canWriteDoubleBoxed())
                        return;

                    writeDoubleBoxed(null);
                    break;
                }
                case 33: {
                    writeString(null);

                    if (interrupted())
                        return;

                    break;
                }
                case 34: {
                    writeString("");

                    if (interrupted())
                        return;

                    break;
                }
                case 35: {
                    writeString("\u0000");

                    if (interrupted())
                        return;

                    break;
                }
                case 36: {
                    writeString("\u00FF");

                    if (interrupted())
                        return;

                    break;
                }
                case 37: {
                    writeString("\u0AFF");

                    if (interrupted())
                        return;

                    break;
                }
                case 38: {
                    writeString("\u7FFF");

                    if (interrupted())
                        return;

                    break;
                }
                case 39: {
                    writeString("\uFFFF");

                    if (interrupted())
                        return;

                    break;
                }
                case 40: {
                    writeString("ffqsdfqfezghrtghrgrfgzefzeqfzeqfqzefqzefqzefqzeefqzefqzefsdqfsdghfgzegqzefqsdfqzefqezfqzefqze'");

                    if (interrupted())
                        return;

                    break;
                }
                case 41: {
                    if (!canWriteDate())
                        return;

                    writeDate(null);
                    break;
                }
                case 42: {
                    if (!canWriteDate())
                        return;

                    writeDate(new java.util.Date(4558621531843L));
                    break;
                }
                case 43: {
                    if (!canWriteDate())
                        return;

                    writeDate(new java.util.Date(0));
                    break;
                }
                case 44: {
                    writeBigInteger(null);

                    if (interrupted())
                        return;

                    break;
                }
                case 45: {
                    writeBigInteger(new java.math.BigInteger("0"));

                    if (interrupted())
                        return;

                    break;
                }
                case 46: {
                    writeBigInteger(new java.math.BigInteger("-0"));

                    if (interrupted())
                        return;

                    break;
                }
                case 47: {
                    writeBigInteger(new java.math.BigInteger("45"));

                    if (interrupted())
                        return;

                    break;
                }
                case 48: {
                    writeBigInteger(new java.math.BigInteger("-45"));

                    if (interrupted())
                        return;

                    break;
                }
                case 49: {
                    writeBigInteger(new java.math.BigInteger("1237987"));

                    if (interrupted())
                        return;

                    break;
                }
                case 50: {
                    writeBigInteger(new java.math.BigInteger("-1237987"));

                    if (interrupted())
                        return;

                    break;
                }
                case 51: {
                    writeBigInteger(new java.math.BigInteger("1237987898798797464864181688684513518313131813113513"));

                    if (interrupted())
                        return;

                    break;
                }
                case 52: {
                    writeBigInteger(new java.math.BigInteger("-1237987898798797464864181688684513518313131813113513"));

                    if (interrupted())
                        return;

                    break;
                }
                case 53: {
                    writeDecimal(null);

                    if (interrupted())
                        return;

                    break;
                }
                case 54: {
                    writeDecimal(new java.math.BigDecimal( "0"));

                    if (interrupted())
                        return;

                    break;
                }
                case 55: {
                    writeDecimal(new java.math.BigDecimal( "-0"));

                    if (interrupted())
                        return;

                    break;
                }
                case 56: {
                    writeDecimal(new java.math.BigDecimal( "45"));

                    if (interrupted())
                        return;

                    break;
                }
                case 57: {
                    writeDecimal(new java.math.BigDecimal( "-45"));

                    if (interrupted())
                        return;

                    break;
                }
                case 58: {
                    writeDecimal(new java.math.BigDecimal( "123798789879879.456464"));

                    if (interrupted())
                        return;

                    break;
                }
                case 59: {
                    writeDecimal(new java.math.BigDecimal( "-123798789879879.456464"));

                    if (interrupted())
                        return;

                    break;
                }
                case 60: {
                    writeDecimal(new java.math.BigDecimal( "0.000000000000078"));

                    if (interrupted())
                        return;

                    break;
                }
                case 61: {
                    writeDecimal(new java.math.BigDecimal( "-0.000000000000078"));

                    if (interrupted())
                        return;

                    break;
                }
                case 62: {
                    writeDecimal(new java.math.BigDecimal( "2.0e5"));

                    if (interrupted())
                        return;

                    break;
                }
                case 63: {
                    writeDecimal(new java.math.BigDecimal( "-2.0e5"));

                    if (interrupted())
                        return;

                    break;
                }
                case 64: {
                    writeDecimal(new java.math.BigDecimal( "789.046544654846468789486e13"));

                    if (interrupted())
                        return;

                    break;
                }
                case 65: {
                    writeDecimal(new java.math.BigDecimal( "-789.046544654846468789486e13"));

                    if (interrupted())
                        return;

                    break;
                }
                case 66: {
                    writeDecimal(new java.math.BigDecimal( "789.046544654846468789486e-13"));

                    if (interrupted())
                        return;

                    break;
                }
                case 67: {
                    writeDecimal(new java.math.BigDecimal( "-789.046544654846468789486e-13"));

                    if (interrupted())
                        return;

                    break;
                }
                case 68: {
                    writeBinary(null);

                    if (interrupted())
                        return;

                    break;
                }
                case 69: {
                    writeBinary(new byte[] { 45, 88 });

                    if (interrupted())
                        return;

                    break;
                }
                default:
                    return;
            }

            _index++;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy