Example usage for org.apache.thrift TUnion setFieldValue

List of usage examples for org.apache.thrift TUnion setFieldValue

Introduction

In this page you can find the example usage for org.apache.thrift TUnion setFieldValue.

Prototype

public void setFieldValue(int fieldId, Object value) 

Source Link

Usage

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;
}