类 ProtobufProxyUtils

java.lang.Object
com.baidu.bjf.remoting.protobuf.utils.ProtobufProxyUtils

public class ProtobufProxyUtils extends Object
Utility class for probuf proxy.
从以下版本开始:
1.0.7
作者:
xiemalin
  • 字段详细资料

    • TYPE_MAPPING

      public static final Map<Class<?>,FieldType> TYPE_MAPPING
      The Constant TYPE_MAPPING.
    • FIELD_FILTER_STARTS

      public static final List<String> FIELD_FILTER_STARTS
      The Constant FIELD_FILTER_STARTS.
  • 构造器详细资料

    • ProtobufProxyUtils

      public ProtobufProxyUtils()
  • 方法详细资料

    • isScalarType

      public static boolean isScalarType(Class<?> cls)
      Test if target type is from protocol buffer default type.
      参数:
      cls - target type
      返回:
      true if is from protocol buffer default type
    • fetchFieldInfos

      public static List<FieldInfo> fetchFieldInfos(Class cls, boolean ignoreNoAnnotation)
      Fetch field infos.
      返回:
      the list
    • processDefaultValue

      public static List<FieldInfo> processDefaultValue(List<Field> fields, boolean ignoreNoAnnotation, boolean isZipZap)
      to process default value of @Protobuf value on field.
      参数:
      fields - all field to process
      ignoreNoAnnotation - the ignore no annotation
      isZipZap - the is zip zap
      返回:
      list of fields
    • isObjectType

      public static boolean isObjectType(Class<?> cls)
      Checks if is object type.
      参数:
      cls - the cls
      返回:
      true, if is object type
    • processProtobufType

      public static String processProtobufType(Class<?> cls)
      Process protobuf type.
      参数:
      cls - the cls
      返回:
      the string