build.lombok.ast_generatedSource.lombok.ast.StaticInitializer 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 StaticInitializer 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.StaticInitializer 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.StaticInitializer 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.visitStaticInitializer(this)) return;
if (this.body != null) this.body.accept(visitor);
visitor.afterVisitStaticInitializer(this);
visitor.endVisit(this);
}
@java.lang.Override public StaticInitializer copy() {
StaticInitializer result = new StaticInitializer();
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