public static < T > Serializer < T > dummySerializer ( ) { return new Serializer < T > ( ) { @ Override public void write ( PrimitivO output , T object ) { throw new RuntimeException ( "Dummy serializer." ) ; } @ Override public T read ( PrimitivI input ) { throw new RuntimeException ( "Dummy serializer." ) ; } @ Override public boolean isReference ( ) { return true ; } @ Override public boolean handlesReference ( ) { return false ; } } ; }
Serializer that throws exception for any serialization . Use for known objects .