List of usage examples for org.apache.thrift TUnion setFieldValue
public void setFieldValue(int fieldId, Object value)
From source file:org.apache.aurora.scheduler.http.api.GsonMessageBodyHandler.java
License:Apache License
@SuppressWarnings({ "unchecked", "rawtypes" })
private static TUnion<?, ?> createUnion(Class<?> unionType, TFieldIdEnum setField, Object fieldValue)
throws IllegalAccessException, InstantiationException {
TUnion union = (TUnion) unionType.newInstance();
union.setFieldValue(setField, fieldValue);
return union;
}