Beispiel #1
0
  private ThriftType(ThriftStructMetadata<?> structMetadata) {
    Preconditions.checkNotNull(structMetadata, "structMetadata is null");

    this.protocolType = STRUCT;
    this.javaType = structMetadata.getStructClass();
    keyType = null;
    valueType = null;
    this.structMetadata = structMetadata;
    this.enumMetadata = null;
    this.uncoercedType = null;
  }
Beispiel #2
0
 @Override
 public String toString() {
   final StringBuilder sb = new StringBuilder();
   sb.append("ThriftType");
   sb.append("{");
   sb.append(protocolType).append(" ").append(javaType);
   if (structMetadata != null) {
     sb.append(" ").append(structMetadata.getStructClass().getName());
   } else if (keyType != null) {
     sb.append(" keyType=").append(keyType);
     sb.append(", valueType=").append(valueType);
   } else if (valueType != null) {
     sb.append(" valueType=").append(valueType);
   }
   sb.append('}');
   return sb.toString();
 }