Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 //Copyright (c) 2012, David Yu
 //All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are met:
 // 1. Redistributions of source code must retain the above copyright notice,
 //    this list of conditions and the following disclaimer.
 // 2. Redistributions in binary form must reproduce the above copyright notice,
//    this list of conditions and the following disclaimer in the documentation
//    and/or other materials provided with the distribution.
// 3. Neither the name of protostuff nor the names of its contributors may be used
//    to endorse or promote products derived from this software without
//    specific prior written permission.
package io.protostuff.runtime;
Controls how certain types are serialized and can even override the existing serializers because this has higher priority when the fields are being built.

David Yu
Apr 20, 2012
public interface Delegate<V>

The field type (for possible reflective operations in future releases).
    public FieldType getFieldType();

Reads the value from the input.
    public V readFrom(Input inputthrows IOException;

Writes the value to the output.
    public void writeTo(Output outputint number, V valueboolean repeated)
            throws IOException;

Transfers the type from the input to the output.
    public void transfer(Pipe pipeInput inputOutput outputint number,
            boolean repeatedthrows IOException;

The class of the target value.
    public Class<?> typeClass();
New to GrepCode? Check out our FAQ X