# Path: src/som/vmobjects/abstract_object.py
# class AbstractObject(object):
# 
#     def __init__(self):
#         pass
# 
#     def get_class(self, universe):
#         raise NotImplementedError("Subclasses need to implement get_class(universe).")
# 
#     def quick_add(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._add_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     def quick_multiply(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._multiply_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     def quick_subtract(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._subtract_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     @staticmethod
#     def is_invokable():
#         return False
# 
#     def __str__(self):
#         from som.vm.universe import get_current
#         return "a " + self.get_class(get_current()).get_name().get_embedded_string()


from .abstract_object import AbstractObject
from .object_without_fields import ObjectWithoutFields
from som.vm.globals import nilObject
    def get_class(self, universe):
        return self._class

    def set_class(self, value):
        self._class = value

    def get_field_name(self, index):
        # Get the name of the field with the given index
        return self._class.get_instance_field_name(index)

    def get_field_index(self, name):
        # Get the index for the field with the given name
        return self._class.lookup_field_index(name)

    def get_number_of_fields(self):
        # Get the number of fields in this object
        return len(self._fields)

    def _get_default_number_of_fields(self):
        # Return the default number of fields in an object
        return self.NUMBER_OF_OBJECT_FIELDS

    def get_field(self, index):
        # Get the field with the given index
        assert isinstance(index, int)
        return self._fields[index]

    def set_field(self, index, value):
        # Set the field with the given index to the given value
        assert isinstance(index, int)

# Path: src/som/vmobjects/abstract_object.py
# class AbstractObject(object):
# 
#     def __init__(self):
#         pass
# 
#     def get_class(self, universe):
#         raise NotImplementedError("Subclasses need to implement get_class(universe).")
# 
#     def quick_add(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._add_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     def quick_multiply(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._multiply_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     def quick_subtract(self, from_method, frame, interpreter, bytecode_index):
#         interpreter._send(from_method, frame, interpreter._subtract_symbol,
#                           self.get_class(interpreter.get_universe()),
#                           bytecode_index)
# 
#     @staticmethod
#     def is_invokable():
#         return False
# 
#     def __str__(self):
#         from som.vm.universe import get_current
#         return "a " + self.get_class(get_current()).get_name().get_embedded_string()


# Path: src/som/vmobjects/object.py
from .abstract_object import AbstractObject
from .object_without_fields import ObjectWithoutFields
from som.vm.globals import nilObject

    def get_class(self, universe):
        return self._class

    def set_class(self, value):
        self._class = value

    def get_field_name(self, index):
        # Get the name of the field with the given index
        return self._class.get_instance_field_name(index)

    def get_field_index(self, name):
        # Get the index for the field with the given name
        return self._class.lookup_field_index(name)

    def get_number_of_fields(self):
        # Get the number of fields in this object
        return len(self._fields)

    def _get_default_number_of_fields(self):
        # Return the default number of fields in an object
        return self.NUMBER_OF_OBJECT_FIELDS

    def get_field(self, index):
        # Get the field with the given index
        assert isinstance(index, int)
        return self._fields[index]

    def set_field(self, index, value):
        # Set the field with the given index to the given value
        assert isinstance(index, int)

        assert isinstance(value, AbstractObject)