Class UnresolvedExpression

  • All Implemented Interfaces:
    IAttributeAccess

    public class UnresolvedExpression
    extends ConstraintSyntaxTree
    Denotes an expression (tree) which is currently unresolved due to deferred imports, e.g. model imports resolved at runtime.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • UnresolvedExpression

        public UnresolvedExpression​(java.lang.String unresolvedLeaf)
        Creates an unresolved expression as a (currently unknown) textual leaf.
        Parameters:
        unresolvedLeaf - the the unresolved leaf
      • UnresolvedExpression

        public UnresolvedExpression​(ConstraintSyntaxTree expression)
        Creates an unresolved expression as an inner tree node.
        Parameters:
        expression - the contained (unresolved) expression
    • Method Detail

      • isLeaf

        public boolean isLeaf()
        Returns whether this tree node represents a CST leaf.
        Returns:
        true if it is a leaf, false else
      • isResolved

        public boolean isResolved()
        Returns whether this expression is actually resolved.
        Returns:
        true if it is resolved, false else
      • getUnresolvedLeaf

        public java.lang.String getUnresolvedLeaf()
        Returns the unresolved leaf text.
        Returns:
        the unresolved leaf text (may be null)
      • setConstantValue

        public void setConstantValue​(Value value)
        Changes the actual expression to a constant value.
        Parameters:
        value - the inferred constant value
      • setActualExpression

        void setActualExpression​(ConstraintSyntaxTree actualExpression)
        Changes the actual expression.
        Parameters:
        actualExpression - the new actual expression
      • getActualExpression

        public ConstraintSyntaxTree getActualExpression()
        Returns the actual expression. This may be an inferred constant value or the actually resolved expression.
        Returns:
        the actual expression (may be null)