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

package lombok.ast;

public class StringLiteral extends lombok.ast.AbstractNode implements lombok.ast.Literal, lombok.ast.Expression, lombok.ast.DescribedNode {
	private java.util.List<lombok.ast.Position> parensPositions = new java.util.ArrayList<lombok.ast.Position>();
	private java.lang.String 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.String astValue() {
		if (this.errorReasonForValue != null) return null;
		return this.value;
	}
	
	public lombok.ast.StringLiteral astValue(java.lang.String value) {
		if (value == null) throw new java.lang.NullPointerException("value is mandatory");
		this.errorReasonForValue = null;
		this.value = value;
		this.rawValue = lombok.ast.StringLiteralTemplate.generateString(value);
		return this;
	}
	
	public java.lang.String rawValue() {
		return this.rawValue;
	}
	
	public java.lang.String getErrorReasonForValue() {
		return this.errorReasonForValue;
	}
	
	public lombok.ast.StringLiteral rawValue(java.lang.String value) {
		this.rawValue = value;
		this.value = null;
		this.errorReasonForValue = null;
		try {
			this.value = lombok.ast.StringLiteralTemplate.parseString(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.visitStringLiteral(this)) return;
		visitor.afterVisitStringLiteral(this);
		visitor.endVisit(this);
	}
	
	@java.lang.Override public StringLiteral copy() {
		StringLiteral result = new StringLiteral();
		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 java.lang.String getDescription() {
		return lombok.ast.StringLiteralTemplate.getDescription(this);
	}
	
	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);
	}
	
}
