//Generated by lombok.ast.template.TemplateProcessor. DO NOT EDIT, DO NOT CHECK IN!

package lombok.ast;

public class BooleanLiteral extends lombok.ast.AbstractNode implements lombok.ast.Literal, lombok.ast.Expression {
	private java.util.List<lombok.ast.Position> parensPositions = new java.util.ArrayList<lombok.ast.Position>();
	private java.lang.Boolean value = null;
	private java.lang.String rawValue;
	private java.lang.String errorReasonForValue = "missing value";
	
	public java.util.List<lombok.ast.Position> astParensPositions() {
		return this.parensPositions;
	}
	
	public java.lang.Boolean astValue() {
		if (this.errorReasonForValue != null) return null;
		return this.value;
	}
	
	public lombok.ast.BooleanLiteral astValue(java.lang.Boolean value) {
		if (value == null) throw new java.lang.NullPointerException("value is mandatory");
		this.errorReasonForValue = null;
		this.value = value;
		this.rawValue = lombok.ast.BooleanLiteralTemplate.generateBoolean(value);
		return this;
	}
	
	public java.lang.String rawValue() {
		return this.rawValue;
	}
	
	public java.lang.String getErrorReasonForValue() {
		return this.errorReasonForValue;
	}
	
	public lombok.ast.BooleanLiteral rawValue(java.lang.String value) {
		this.rawValue = value;
		this.value = null;
		this.errorReasonForValue = null;
		try {
			this.value = lombok.ast.BooleanLiteralTemplate.parseBoolean(value);
		} catch (java.lang.IllegalArgumentException e) {
			this.errorReasonForValue = e.getMessage() == null ? e.toString() : e.getMessage();
		} catch (Exception e) {
			this.errorReasonForValue = e.toString();
		}
		return this;
	}
	@java.lang.Override public java.util.List<Node> getChildren() {
		java.util.List<Node> result = new java.util.ArrayList<Node>();
		return result;
	}
	
	@java.lang.Override public boolean replaceChild(Node original, Node replacement) throws lombok.ast.AstException {
		return false;
	}
	
	@java.lang.Override public boolean detach(Node child) {
		return false;
	}
	
	@java.lang.Override public void accept(lombok.ast.AstVisitor visitor) {
		if (visitor.visitBooleanLiteral(this)) return;
		visitor.afterVisitBooleanLiteral(this);
		visitor.endVisit(this);
	}
	
	@java.lang.Override public BooleanLiteral copy() {
		BooleanLiteral result = new BooleanLiteral();
		result.parensPositions = new java.util.ArrayList<lombok.ast.Position>(this.parensPositions);
		result.value = this.value;
		result.rawValue = this.rawValue;
		result.errorReasonForValue = this.errorReasonForValue;
		return result;
	}
	
	public int getParens() {
		return lombok.ast.ExpressionMixin.getParens(this);
	}
	
	public int getIntendedParens() {
		return lombok.ast.ExpressionMixin.getIntendedParens(this);
	}
	
	public boolean needsParentheses() {
		return lombok.ast.ExpressionMixin.needsParentheses(this);
	}
	
	public boolean isStatementExpression() {
		return lombok.ast.ExpressionMixin.isStatementExpression(this);
	}
	
}
