
build.lombok.ast_generatedSource.lombok.ast.UnaryExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lombok-ast Show documentation
Show all versions of lombok-ast Show documentation
This is a very small fork of lombok.ast as some Android tools needed a few modifications. The normal repository for lombok.ast is here https://github.com/rzwitserloot/lombok.ast and our changes for 0.2.3 are in this pull request: https://github.com/rzwitserloot/lombok.ast/pull/8
The newest version!
//Generated by lombok.ast.template.TemplateProcessor. DO NOT EDIT, DO NOT CHECK IN!
package lombok.ast;
public class UnaryExpression extends lombok.ast.AbstractNode implements lombok.ast.Expression, lombok.ast.DescribedNode {
private java.util.List parensPositions = new java.util.ArrayList();
private UnaryOperator operator = null;
private lombok.ast.AbstractNode operand = null;
public java.util.List astParensPositions() {
return this.parensPositions;
}
public UnaryOperator astOperator() {
return this.operator;
}
public lombok.ast.UnaryExpression astOperator(UnaryOperator operator) {
if (operator == null) throw new java.lang.NullPointerException("operator is mandatory");
this.operator = operator;
return this;
}
public Expression astOperand() {
if (!(this.operand instanceof Expression)) return null;
return (Expression) this.operand;
}
public lombok.ast.UnaryExpression astOperand(Expression operand) {
if (operand == null) throw new java.lang.NullPointerException("operand is mandatory");
return this.rawOperand(operand);
}
public lombok.ast.Node rawOperand() {
return this.operand;
}
public lombok.ast.UnaryExpression rawOperand(lombok.ast.Node operand) {
if (operand == this.operand) return this;
if (operand != null) this.adopt((lombok.ast.AbstractNode)operand);
if (this.operand != null) this.disown(this.operand);
this.operand = (lombok.ast.AbstractNode)operand;
return this;
}
@java.lang.Override public java.util.List getChildren() {
java.util.List result = new java.util.ArrayList();
if (this.operand != null) result.add(this.operand);
return result;
}
@java.lang.Override public boolean replaceChild(Node original, Node replacement) throws lombok.ast.AstException {
if (this.operand == original) {
this.rawOperand(replacement);
return true;
}
return false;
}
@java.lang.Override public boolean detach(Node child) {
if (this.operand == child) {
this.disown((AbstractNode) child);
this.operand = null;
return true;
}
return false;
}
@java.lang.Override public void accept(lombok.ast.AstVisitor visitor) {
if (visitor.visitUnaryExpression(this)) return;
if (this.operand != null) this.operand.accept(visitor);
visitor.afterVisitUnaryExpression(this);
visitor.endVisit(this);
}
@java.lang.Override public UnaryExpression copy() {
UnaryExpression result = new UnaryExpression();
result.parensPositions = new java.util.ArrayList(this.parensPositions);
result.operator = this.operator;
if (this.operand != null) result.rawOperand(this.operand.copy());
return result;
}
public java.lang.String getDescription() {
return lombok.ast.UnaryExpressionTemplate.getDescription(this);
}
public boolean needsParentheses() {
return lombok.ast.UnaryExpressionTemplate.needsParentheses(this);
}
public int getParens() {
return lombok.ast.ExpressionMixin.getParens(this);
}
public int getIntendedParens() {
return lombok.ast.ExpressionMixin.getIntendedParens(this);
}
public boolean isStatementExpression() {
return lombok.ast.ExpressionMixin.isStatementExpression(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy