Class Expression

    • Field Detail

      • type

        protected Type type
        The type of the value after evaluation.
    • Constructor Detail

      • Expression

        public Expression()
    • Method Detail

      • getPropagationType

        public Type getPropagationType()
        Specified by:
        getPropagationType in interface HasType
        Returns:
        The returned Type is always the same as getType() with the exception of ReferenceType since there is no case in which we want to propagate a reference when using typeChanged()
      • updateType

        public void updateType​(Type type)
        Description copied from interface: HasType
        Sideeffect free type modification WARNING: This should only be used by the TypeSystem Pass
        Specified by:
        updateType in interface HasType
        Parameters:
        type - new type
      • setType

        public void setType​(Type type,
                            HasType root)
        Description copied from interface: HasType
        Set the node's type. This may start a chain of type listener notifications
        Specified by:
        setType in interface HasType
        Parameters:
        type - new type
        root - The node that initiated the type change chain. When a node receives a type setting command where root == this, we know that we have a type listener circle and can abort. If root == null, the type change is seen as an externally triggered event and subsequent type listeners receive the current node as their root.
      • resetTypes

        public void resetTypes​(Type type)
        Description copied from interface: HasType
        Used to set the type and clear the possible subtypes list for when a type is more precise than the current.
        Specified by:
        resetTypes in interface HasType
        Parameters:
        type - the more precise type
      • refreshType

        public void refreshType()
        Specified by:
        refreshType in interface HasType
      • toString

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class Statement