Example #1
0
 def decode_attributes(data, count, constants):
     attributes = []
     offset = 0
     for k in range(count):
         attribute = Attribute.parse(data[offset:], constants)
         offset += attribute.size()
         attributes.append(attribute)
     return attributes, data[offset:]
Example #2
0
 def decode_attributes(data, count, constants):
   attributes = []
   offset = 0
   for k in range(count):
     attribute = Attribute.parse(data[offset:], constants)
     offset += attribute.size()
     attributes.append(attribute)
   return attributes, data[offset:]
Example #3
0
 def __init__(self, data, constants):
   self._access_flags = FieldInfoFlags(data[0:2])
   (self._name_index, self._descriptor_index, self._attributes_count), data = \
     JavaNativeType.parse(data[2:], u2, u2, u2)
   self._name = constants[self._name_index] # synthesized
   self._descriptor = constants[self._descriptor_index] # synthesized
   self._parsed_descriptor, _ = FieldDescriptor.match(self._descriptor.bytes())
   self._attributes = []
   offset = 0
   for k in range(self._attributes_count):
     attribute = Attribute.parse(data[offset:], constants)
     offset += attribute.size()
     self._attributes.append(attribute)
   self._size = offset + 8
Example #4
0
 def __init__(self, data, constants):
     self._access_flags = FieldInfoFlags(data[0:2])
     (self._name_index, self._descriptor_index, self._attributes_count), data = \
       JavaNativeType.parse(data[2:], u2, u2, u2)
     self._name = constants[self._name_index]  # synthesized
     self._descriptor = constants[self._descriptor_index]  # synthesized
     self._parsed_descriptor, _ = FieldDescriptor.match(
         self._descriptor.bytes())
     self._attributes = []
     offset = 0
     for k in range(self._attributes_count):
         attribute = Attribute.parse(data[offset:], constants)
         offset += attribute.size()
         self._attributes.append(attribute)
     self._size = offset + 8