Package org.apache.thrift.meta_data

Examples of org.apache.thrift.meta_data.FieldValueMetaData


    Map<? extends org.apache.thrift.TFieldIdEnum, FieldMetaData> fieldMap =
      FieldMetaData.getStructMetaDataMap(thriftObj.getClass());

    for (Map.Entry<? extends TFieldIdEnum, FieldMetaData> e : fieldMap.entrySet()) {
      final TFieldIdEnum tFieldIdEnum = e.getKey();
      final FieldValueMetaData thriftMetadata = e.getValue().valueMetaData;

      FieldDescriptor protoFieldDesc = protoDesc.findFieldByName(tFieldIdEnum.getFieldName());
      if ( protoFieldDesc == null ) {
        throw new RuntimeException("Field " + tFieldIdEnum.getFieldName() +
            " not found in " + protoObj_.getClass().getCanonicalName());
View Full Code Here


    byte thriftType = thriftMetadata.type;

    // TODO: Handle Lists that are more than 1 level deep. Be all pro-style with the recursion.
    if (thriftMetadata.type == TType.LIST && protoFieldDesc.isRepeated())  {
      FieldValueMetaData listMeta = ((ListMetaData) thriftMetadata).elemMetaData;
      if (listMeta.isStruct() || listMeta.isContainer()) {
        return false;
      }
      thriftType = listMeta.type;
    }
    return (protoFieldDesc.getType().equals(thriftTypeToProtoType(thriftType)) ||
View Full Code Here

TOP

Related Classes of org.apache.thrift.meta_data.FieldValueMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.