build.lombok.ast_generatedSource.lombok.ast.InstanceOf 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 InstanceOf extends lombok.ast.AbstractNode implements lombok.ast.Expression {
private java.util.List parensPositions = new java.util.ArrayList();
private lombok.ast.AbstractNode objectReference = null;
private lombok.ast.AbstractNode typeReference = null;
public java.util.List astParensPositions() {
return this.parensPositions;
}
public Expression astObjectReference() {
if (!(this.objectReference instanceof Expression)) return null;
return (Expression) this.objectReference;
}
public lombok.ast.InstanceOf astObjectReference(Expression objectReference) {
if (objectReference == null) throw new java.lang.NullPointerException("objectReference is mandatory");
return this.rawObjectReference(objectReference);
}
public lombok.ast.Node rawObjectReference() {
return this.objectReference;
}
public lombok.ast.InstanceOf rawObjectReference(lombok.ast.Node objectReference) {
if (objectReference == this.objectReference) return this;
if (objectReference != null) this.adopt((lombok.ast.AbstractNode)objectReference);
if (this.objectReference != null) this.disown(this.objectReference);
this.objectReference = (lombok.ast.AbstractNode)objectReference;
return this;
}
public TypeReference astTypeReference() {
if (!(this.typeReference instanceof TypeReference)) return null;
return (TypeReference) this.typeReference;
}
public lombok.ast.InstanceOf astTypeReference(TypeReference typeReference) {
if (typeReference == null) throw new java.lang.NullPointerException("typeReference is mandatory");
return this.rawTypeReference(typeReference);
}
public lombok.ast.Node rawTypeReference() {
return this.typeReference;
}
public lombok.ast.InstanceOf rawTypeReference(lombok.ast.Node typeReference) {
if (typeReference == this.typeReference) return this;
if (typeReference != null) this.adopt((lombok.ast.AbstractNode)typeReference);
if (this.typeReference != null) this.disown(this.typeReference);
this.typeReference = (lombok.ast.AbstractNode)typeReference;
return this;
}
@java.lang.Override public java.util.List getChildren() {
java.util.List result = new java.util.ArrayList();
if (this.objectReference != null) result.add(this.objectReference);
if (this.typeReference != null) result.add(this.typeReference);
return result;
}
@java.lang.Override public boolean replaceChild(Node original, Node replacement) throws lombok.ast.AstException {
if (this.objectReference == original) {
this.rawObjectReference(replacement);
return true;
}
if (this.typeReference == original) {
this.rawTypeReference(replacement);
return true;
}
return false;
}
@java.lang.Override public boolean detach(Node child) {
if (this.objectReference == child) {
this.disown((AbstractNode) child);
this.objectReference = null;
return true;
}
if (this.typeReference == child) {
this.disown((AbstractNode) child);
this.typeReference = null;
return true;
}
return false;
}
@java.lang.Override public void accept(lombok.ast.AstVisitor visitor) {
if (visitor.visitInstanceOf(this)) return;
if (this.objectReference != null) this.objectReference.accept(visitor);
if (this.typeReference != null) this.typeReference.accept(visitor);
visitor.afterVisitInstanceOf(this);
visitor.endVisit(this);
}
@java.lang.Override public InstanceOf copy() {
InstanceOf result = new InstanceOf();
result.parensPositions = new java.util.ArrayList(this.parensPositions);
if (this.objectReference != null) result.rawObjectReference(this.objectReference.copy());
if (this.typeReference != null) result.rawTypeReference(this.typeReference.copy());
return result;
}
public boolean needsParentheses() {
return lombok.ast.InstanceOfTemplate.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