Patent ID: 7478409

Claim:
A method for handling runtime objects operating on a wireless device, wherein the runtime objects are instantiations of classes, wherein a class can implement an object-oriented interface having methods, comprising the steps of: assigning, for a class, an interface ordinal to an interface based upon a relationship existing between the class and the interface; generating a class interface check table for the class by associating with at least one interface ordinal a reference that points to an interface implemented by a class, wherein more than one interface may share the same interface ordinal in order to minimize the number of interface ordinals; assigning, for a class, a method ordinal to an interface's method based upon a relationship existing between the class and the method, wherein more than one method may share the same method ordinal in order to minimize the number of method ordinals; generating a class interface dispatch table for the class by associating with at least one method ordinal a reference that points to a method of an interface, wherein the generated class interface dispatch table is sparse and; generating a compact dispatch table by merging non-null entries of the class interface dispatch tables at ordinal positions into the compact dispatch table; wherein an assigned interface ordinal and an associated reference stored in the class interface check table are used to check whether a runtime object operating on the wireless device is an instantiation of an interface and; wherein an assigned method ordinal and an associated method reference stored in the compact dispatch table are used to perform a dispatch of an interface's method implemented by the runtime object.