Class Untyped

  • All Implemented Interfaces:
    Type

    public final class Untyped
    extends java.lang.Object
    implements Type
    The untyped type, corresponding to an unknown/untyped type. This type is used as default when no type information is provided for LiSA constructs (e.g., expression, variable, CFG return type). It implements the singleton design pattern, that is the instances of this type are unique. The unique instance of this type can be retrieved by INSTANCE.
    • Field Detail

      • INSTANCE

        public static final Untyped INSTANCE
        Unique instance of Untyped type.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • canBeAssignedTo

        public boolean canBeAssignedTo​(Type other)
        Description copied from interface: Type
        Determines if the type represented by this Type object is either the same as, or is a subtype of, the type represented by other. It returns true if so, and returns false otherwise.
        Specified by:
        canBeAssignedTo in interface Type
        Parameters:
        other - the other type
        Returns:
        true if that condition holds
      • commonSupertype

        public Type commonSupertype​(Type other)
        Description copied from interface: Type
        Yields the most specific common supertype between this Type and the given one. If no common supertype exists, this method returns INSTANCE.
        Specified by:
        commonSupertype in interface Type
        Parameters:
        other - the other type
        Returns:
        the most specific common supertype between this and other
      • allInstances

        public java.util.Collection<Type> allInstances()
        Description copied from interface: Type
        Yields all possible instances of this type, including itself.
        Specified by:
        allInstances in interface Type
        Returns:
        the possible instances