Class WeakObjectType

  • All Implemented Interfaces:
    Serializable, Comparable<RefType>, Numberable, Switchable

    public class WeakObjectType
    extends RefType
    A weak variant of an object type (Object, Serializable, Cloneable). The "java.lang.Object" type can be used as a placeholder for all reference and array types. Assume the following code (without the casts, because they don't need to be explicit in Dalvik):
     java.lang.Object a;
     int[] b;
     
     b = ((Object[]) a)[42];
     b[0] = 42;
     
    If we reconstruct types for this code, the array element from "a" is of type "java.lang.Object", because the array was of type "java.lang.Object[]". Still, this typing is not required, we rather take it, because we have no better guess as to what the original type was. Later on, when we learn that we write an "int" into "b", we can conclude, that "b" should have been of type "int[]". In other words, we need to drop the requirement of "b" being of type "java.lang.Object", which was our initial assumption.
    Author:
    Steven Arzt
    See Also:
    Serialized Form
    • Constructor Detail

      • WeakObjectType

        public WeakObjectType​(String className)