
build.lombok.ast_generatedSource.lombok.ast.InstanceInitializer Maven / Gradle / Ivy
//Generated by lombok.ast.template.TemplateProcessor. DO NOT EDIT, DO NOT CHECK IN!
package lombok.ast;
public class InstanceInitializer extends lombok.ast.AbstractNode implements lombok.ast.TypeMember {
private lombok.ast.AbstractNode body = null;
public TypeBody upToTypeBody() {
if (!(this.getParent() instanceof TypeBody)) return null;
TypeBody out = (TypeBody)this.getParent();
if (!out.rawMembers().contains(this)) return null;
return out;
}
public Block astBody() {
if (!(this.body instanceof Block)) return null;
return (Block) this.body;
}
public lombok.ast.InstanceInitializer astBody(Block body) {
if (body == null) throw new java.lang.NullPointerException("body is mandatory");
return this.rawBody(body);
}
public lombok.ast.Node rawBody() {
return this.body;
}
public lombok.ast.InstanceInitializer rawBody(lombok.ast.Node body) {
if (body == this.body) return this;
if (body != null) this.adopt((lombok.ast.AbstractNode)body);
if (this.body != null) this.disown(this.body);
this.body = (lombok.ast.AbstractNode)body;
return this;
}
@java.lang.Override public java.util.List getChildren() {
java.util.List result = new java.util.ArrayList();
if (this.body != null) result.add(this.body);
return result;
}
@java.lang.Override public boolean replaceChild(Node original, Node replacement) throws lombok.ast.AstException {
if (this.body == original) {
this.rawBody(replacement);
return true;
}
return false;
}
@java.lang.Override public boolean detach(Node child) {
if (this.body == child) {
this.disown((AbstractNode) child);
this.body = null;
return true;
}
return false;
}
@java.lang.Override public void accept(lombok.ast.AstVisitor visitor) {
if (visitor.visitInstanceInitializer(this)) return;
if (this.body != null) this.body.accept(visitor);
visitor.endVisit(this);
}
@java.lang.Override public InstanceInitializer copy() {
InstanceInitializer result = new InstanceInitializer();
if (this.body != null) result.rawBody(this.body.copy());
return result;
}
public lombok.ast.TypeDeclaration upUpToTypeDeclaration() {
return lombok.ast.TypeMemberMixin.upUpToTypeDeclaration(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy