public final class ProtoUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getJsExtensionImport(com.google.protobuf.Descriptors.FieldDescriptor desc)
Returns the JS name of the import for the given extension, suitable for goog.require.
|
static String |
getJsExtensionName(com.google.protobuf.Descriptors.FieldDescriptor desc)
Returns the JS name of the extension, suitable for passing to getExtension().
|
static com.google.protobuf.DescriptorProtos.FieldOptions.JSType |
getJsType(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor) |
static String |
getTofuExtensionImport(com.google.protobuf.Descriptors.FieldDescriptor desc)
Returns the proper .getDescriptor() call for parse info generation in Tofu.
|
static boolean |
hasJsType(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor)
Returns true if this field has a valid jstype annotation.
|
static boolean |
isSanitizedContentField(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor)
Returns true if fieldDescriptor holds a sanitized proto type.
|
static boolean |
isUnsigned(com.google.protobuf.Descriptors.FieldDescriptor descriptor)
Returns true if this field is an unsigned integer.
|
public static boolean isSanitizedContentField(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor)
public static String getTofuExtensionImport(com.google.protobuf.Descriptors.FieldDescriptor desc)
public static String getJsExtensionImport(com.google.protobuf.Descriptors.FieldDescriptor desc)
public static String getJsExtensionName(com.google.protobuf.Descriptors.FieldDescriptor desc)
public static boolean hasJsType(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor)
public static boolean isUnsigned(com.google.protobuf.Descriptors.FieldDescriptor descriptor)
public static com.google.protobuf.DescriptorProtos.FieldOptions.JSType getJsType(com.google.protobuf.Descriptors.FieldDescriptor fieldDescriptor)