/* WildcardExpression -- Automatically generated by TreeBuilder (2024-10-27T16:47Z) */ package de.uni_freiburg.informatik.ultimate.model.acsl.ast; import java.util.List; import de.uni_freiburg.informatik.ultimate.model.acsl.ACSLNode; /** * This can be used as call forall parameter, or as if or * while condition. In all other places it is forbidden. */ public class WildcardExpression extends Expression { private static final java.util.function.Predicate VALIDATOR = ACSLNode.VALIDATORS.get(WildcardExpression.class); /** * The constructor taking initial values. */ public WildcardExpression() { super(); assert VALIDATOR == null || VALIDATOR.test(this) : "Invalid WildcardExpression: " + this; } /** * The constructor taking initial values. * @param type the type of this expression. */ public WildcardExpression(ACSLType type) { super(type); assert VALIDATOR == null || VALIDATOR.test(this) : "Invalid WildcardExpression: " + this; } /** * Returns a textual description of this object. */ public String toString() { return "WildcardExpression"; } public List getOutgoingNodes() { List children = super.getOutgoingNodes(); return children; } public void accept(ACSLVisitor visitor) { if (visitor.visit((Expression)this)) { //visit parent types higher up if necessary } else { return; } if (visitor.visit(this)) { if(type!=null){ type.accept(visitor); } } } public Expression accept(ACSLTransformer visitor) { Expression node = visitor.transform(this); if(node != this){ return node; } ACSLType newtype = null; if(type != null){ newtype = (ACSLType)type.accept(visitor); } if(type != newtype){ return new WildcardExpression(newtype); } return this; } }