Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
com.google.protobuf.jruby.Utils Class Reference

Static Public Member Functions

static void checkNameAvailability (ThreadContext context, String name)
 
static IRubyObject checkType (ThreadContext context, Descriptors.FieldDescriptor.Type fieldType, IRubyObject value, RubyModule typeClass)
 
static String escapeIdentifier (String name)
 
static IRubyObject fieldTypeToRuby (ThreadContext context, DescriptorProtos.FieldDescriptorProto.Type type)
 
static IRubyObject fieldTypeToRuby (ThreadContext context, Descriptors.FieldDescriptor.Type type)
 
static boolean isMapEntry (Descriptors.FieldDescriptor fieldDescriptor)
 
static RubyFieldDescriptor msgdefCreateField (ThreadContext context, String label, IRubyObject name, IRubyObject type, IRubyObject number, IRubyObject typeClass, RubyClass cFieldDescriptor)
 
static int num2uint (IRubyObject value)
 
static long num2ulong (Ruby runtime, IRubyObject value)
 
static Descriptors.FieldDescriptor.Type rubyToFieldType (IRubyObject typeClass)
 
static String unescapeIdentifier (String name)
 
static IRubyObject validateStringEncoding (ThreadContext context, Descriptors.FieldDescriptor.Type type, IRubyObject value)
 
static IRubyObject wrapPrimaryValue (ThreadContext context, Descriptors.FieldDescriptor.Type fieldType, Object value)
 

Static Public Attributes

static String BADNAME_REPLACEMENT = "__DOT__"
 
static String DESCRIPTOR_INSTANCE_VAR = "@descriptor"
 
static String EQUAL_SIGN = "="
 

Static Protected Member Functions

static void checkIntTypePrecision (ThreadContext context, Descriptors.FieldDescriptor.Type type, IRubyObject value)
 
static boolean isRubyNum (Object value)
 
static void validateTypeClass (ThreadContext context, Descriptors.FieldDescriptor.Type type, IRubyObject value)
 

Static Private Member Functions

static IRubyObject fieldTypeToRuby (ThreadContext context, String typeName)
 

Static Private Attributes

static BigInteger UINT64_COMPLEMENTARY = new BigInteger("18446744073709551616")
 
static long UINT_MAX = 0xffffffffl
 

Detailed Description

Definition at line 49 of file Utils.java.

Member Function Documentation

◆ checkIntTypePrecision()

static void com.google.protobuf.jruby.Utils.checkIntTypePrecision ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  type,
IRubyObject  value 
)
inlinestaticprotected

Definition at line 254 of file Utils.java.

◆ checkNameAvailability()

static void com.google.protobuf.jruby.Utils.checkNameAvailability ( ThreadContext  context,
String  name 
)
inlinestatic

Definition at line 207 of file Utils.java.

◆ checkType()

static IRubyObject com.google.protobuf.jruby.Utils.checkType ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  fieldType,
IRubyObject  value,
RubyModule  typeClass 
)
inlinestatic

Definition at line 67 of file Utils.java.

◆ escapeIdentifier()

static String com.google.protobuf.jruby.Utils.escapeIdentifier ( String  name)
inlinestatic

Replace invalid "." in descriptor with DOT

Parameters
name
Returns

Definition at line 217 of file Utils.java.

◆ fieldTypeToRuby() [1/3]

static IRubyObject com.google.protobuf.jruby.Utils.fieldTypeToRuby ( ThreadContext  context,
DescriptorProtos.FieldDescriptorProto.Type  type 
)
inlinestatic

Definition at line 58 of file Utils.java.

◆ fieldTypeToRuby() [2/3]

static IRubyObject com.google.protobuf.jruby.Utils.fieldTypeToRuby ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  type 
)
inlinestatic

Definition at line 54 of file Utils.java.

◆ fieldTypeToRuby() [3/3]

static IRubyObject com.google.protobuf.jruby.Utils.fieldTypeToRuby ( ThreadContext  context,
String  typeName 
)
inlinestaticprivate

Definition at line 62 of file Utils.java.

◆ isMapEntry()

static boolean com.google.protobuf.jruby.Utils.isMapEntry ( Descriptors.FieldDescriptor  fieldDescriptor)
inlinestatic

Definition at line 230 of file Utils.java.

◆ isRubyNum()

static boolean com.google.protobuf.jruby.Utils.isRubyNum ( Object  value)
inlinestaticprotected

Definition at line 268 of file Utils.java.

◆ msgdefCreateField()

static RubyFieldDescriptor com.google.protobuf.jruby.Utils.msgdefCreateField ( ThreadContext  context,
String  label,
IRubyObject  name,
IRubyObject  type,
IRubyObject  number,
IRubyObject  typeClass,
RubyClass  cFieldDescriptor 
)
inlinestatic

Definition at line 236 of file Utils.java.

◆ num2uint()

static int com.google.protobuf.jruby.Utils.num2uint ( IRubyObject  value)
inlinestatic

Definition at line 167 of file Utils.java.

◆ num2ulong()

static long com.google.protobuf.jruby.Utils.num2ulong ( Ruby  runtime,
IRubyObject  value 
)
inlinestatic

Definition at line 179 of file Utils.java.

◆ rubyToFieldType()

static Descriptors.FieldDescriptor.Type com.google.protobuf.jruby.Utils.rubyToFieldType ( IRubyObject  typeClass)
inlinestatic

Definition at line 50 of file Utils.java.

◆ unescapeIdentifier()

static String com.google.protobuf.jruby.Utils.unescapeIdentifier ( String  name)
inlinestatic

Replace DOT in descriptor name with "."

Parameters
name
Returns

Definition at line 226 of file Utils.java.

◆ validateStringEncoding()

static IRubyObject com.google.protobuf.jruby.Utils.validateStringEncoding ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  type,
IRubyObject  value 
)
inlinestatic

Definition at line 190 of file Utils.java.

◆ validateTypeClass()

static void com.google.protobuf.jruby.Utils.validateTypeClass ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  type,
IRubyObject  value 
)
inlinestaticprotected

Definition at line 272 of file Utils.java.

◆ wrapPrimaryValue()

static IRubyObject com.google.protobuf.jruby.Utils.wrapPrimaryValue ( ThreadContext  context,
Descriptors.FieldDescriptor.Type  fieldType,
Object  value 
)
inlinestatic

Definition at line 133 of file Utils.java.

Member Data Documentation

◆ BADNAME_REPLACEMENT

String com.google.protobuf.jruby.Utils.BADNAME_REPLACEMENT = "__DOT__"
static

Definition at line 294 of file Utils.java.

◆ DESCRIPTOR_INSTANCE_VAR

String com.google.protobuf.jruby.Utils.DESCRIPTOR_INSTANCE_VAR = "@descriptor"
static

Definition at line 296 of file Utils.java.

◆ EQUAL_SIGN

String com.google.protobuf.jruby.Utils.EQUAL_SIGN = "="
static

Definition at line 298 of file Utils.java.

◆ UINT64_COMPLEMENTARY

BigInteger com.google.protobuf.jruby.Utils.UINT64_COMPLEMENTARY = new BigInteger("18446744073709551616")
staticprivate

Definition at line 300 of file Utils.java.

◆ UINT_MAX

long com.google.protobuf.jruby.Utils.UINT_MAX = 0xffffffffl
staticprivate

Definition at line 302 of file Utils.java.


The documentation for this class was generated from the following file:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08