Hi all, im new to generics and protoclbuffers concepts

In my application im using generics in one class, following is the my
sample code

public class GPBFormat<T extends Message> implements IGPBFormat<T> {
@Override
public byte[] serialize(T t)
{
    return t.toByteArray();
}
@Override
public T deSerialize(byte[] value)
{
    T.parseFrom(value);
    return null;
}
in my above code im using parseFrom method, but the problem is this
method will exist only in concrete classes(not in message class) i.e
which classes extends the Message class, so im unable to access
parseFrom method with this generics. How can i solve this?

Thanks, R.Ramesh

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to