com.evernote.thrift
Interface TReflectionBase<T extends TBase,F extends TFieldIdEnum>

All Superinterfaces:
Comparable<T>, Serializable, TBase<T>
All Known Implementing Classes:
TUnion

public interface TReflectionBase<T extends TBase,F extends TFieldIdEnum>
extends TBase<T>

Generic base interface for generated Thrift objects that support field manipulation via reflection.


Method Summary
 F fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 Object getFieldValue(F field)
          Get a field's value by field variable.
 boolean isSet(F field)
          Check if a field is currently set or unset.
 void setFieldValue(F field, Object value)
          Set a field's value by field variable.
 
Methods inherited from interface com.evernote.thrift.TBase
clear, deepCopy, read, write
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

fieldForId

F fieldForId(int fieldId)
Get the F instance that corresponds to fieldId.


isSet

boolean isSet(F field)
Check if a field is currently set or unset.

Parameters:
field -

getFieldValue

Object getFieldValue(F field)
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Parameters:
field -

setFieldValue

void setFieldValue(F field,
                   Object value)
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Parameters:
field -


Copyright © 2013. All Rights Reserved.