/* NullPointer -- 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; /** * Represents a null pointer which is a special form of a expression. */ public class NullPointer extends Expression { private static final java.util.function.Predicate VALIDATOR = ACSLNode.VALIDATORS.get(NullPointer.class); /** * The constructor taking initial values. */ public NullPointer() { super(); assert VALIDATOR == null || VALIDATOR.test(this) : "Invalid NullPointer: " + this; } /** * The constructor taking initial values. * @param type the type of this expression. */ public NullPointer(ACSLType type) { super(type); assert VALIDATOR == null || VALIDATOR.test(this) : "Invalid NullPointer: " + this; } /** * Returns a textual description of this object. */ public String toString() { return "NullPointer"; } 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 NullPointer(newtype); } return this; } }