All Downloads are FREE. Search and download functionalities are using the official Maven repository.

build.lombok.ast_generatedSource.lombok.ast.ConstructorInvocation Maven / Gradle / Ivy

Go to download

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 ConstructorInvocation extends lombok.ast.AbstractNode implements lombok.ast.Expression, lombok.ast.DescribedNode {
	private java.util.List parensPositions = new java.util.ArrayList();
	private lombok.ast.AbstractNode qualifier = null;
	lombok.ast.ListAccessor constructorTypeArguments = ListAccessor.of(this, TypeReference.class, "ConstructorInvocation.constructorTypeArguments");
	private lombok.ast.AbstractNode typeReference = null;
	lombok.ast.ListAccessor arguments = ListAccessor.of(this, Expression.class, "ConstructorInvocation.arguments");
	private lombok.ast.AbstractNode anonymousClassBody = null;
	
	public java.util.List astParensPositions() {
		return this.parensPositions;
	}
	
	public Expression astQualifier() {
		if (!(this.qualifier instanceof Expression)) return null;
		return (Expression) this.qualifier;
	}
	
	public lombok.ast.ConstructorInvocation astQualifier(Expression qualifier) {
		return this.rawQualifier(qualifier);
	}
	
	public lombok.ast.Node rawQualifier() {
		return this.qualifier;
	}
	
	public lombok.ast.ConstructorInvocation rawQualifier(lombok.ast.Node qualifier) {
		if (qualifier == this.qualifier) return this;
		if (qualifier != null) this.adopt((lombok.ast.AbstractNode)qualifier);
		if (this.qualifier != null) this.disown(this.qualifier);
		this.qualifier = (lombok.ast.AbstractNode)qualifier;
		return this;
	}
	
	public lombok.ast.RawListAccessor rawConstructorTypeArguments() {
		return this.constructorTypeArguments.asRaw();
	}
	
	public lombok.ast.StrictListAccessor astConstructorTypeArguments() {
		return this.constructorTypeArguments.asStrict();
	}
	
	public TypeReference astTypeReference() {
		if (!(this.typeReference instanceof TypeReference)) return null;
		return (TypeReference) this.typeReference;
	}
	
	public lombok.ast.ConstructorInvocation 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.ConstructorInvocation 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;
	}
	
	public lombok.ast.RawListAccessor rawArguments() {
		return this.arguments.asRaw();
	}
	
	public lombok.ast.StrictListAccessor astArguments() {
		return this.arguments.asStrict();
	}
	
	public NormalTypeBody astAnonymousClassBody() {
		if (!(this.anonymousClassBody instanceof NormalTypeBody)) return null;
		return (NormalTypeBody) this.anonymousClassBody;
	}
	
	public lombok.ast.ConstructorInvocation astAnonymousClassBody(NormalTypeBody anonymousClassBody) {
		return this.rawAnonymousClassBody(anonymousClassBody);
	}
	
	public lombok.ast.Node rawAnonymousClassBody() {
		return this.anonymousClassBody;
	}
	
	public lombok.ast.ConstructorInvocation rawAnonymousClassBody(lombok.ast.Node anonymousClassBody) {
		if (anonymousClassBody == this.anonymousClassBody) return this;
		if (anonymousClassBody != null) this.adopt((lombok.ast.AbstractNode)anonymousClassBody);
		if (this.anonymousClassBody != null) this.disown(this.anonymousClassBody);
		this.anonymousClassBody = (lombok.ast.AbstractNode)anonymousClassBody;
		return this;
	}
	
	@java.lang.Override public java.util.List getChildren() {
		java.util.List result = new java.util.ArrayList();
		if (this.qualifier != null) result.add(this.qualifier);
		result.addAll(this.constructorTypeArguments.backingList());
		if (this.typeReference != null) result.add(this.typeReference);
		result.addAll(this.arguments.backingList());
		if (this.anonymousClassBody != null) result.add(this.anonymousClassBody);
		return result;
	}
	
	@java.lang.Override public boolean replaceChild(Node original, Node replacement) throws lombok.ast.AstException {
		if (this.qualifier == original) {
			this.rawQualifier(replacement);
			return true;
		}
		if (this.rawConstructorTypeArguments().replace(original, replacement)) return true;
		if (this.typeReference == original) {
			this.rawTypeReference(replacement);
			return true;
		}
		if (this.rawArguments().replace(original, replacement)) return true;
		if (this.anonymousClassBody == original) {
			this.rawAnonymousClassBody(replacement);
			return true;
		}
		return false;
	}
	
	@java.lang.Override public boolean detach(Node child) {
		if (this.qualifier == child) {
			this.disown((AbstractNode) child);
			this.qualifier = null;
			return true;
		}
		if (this.rawConstructorTypeArguments().remove(child)) return true;
		if (this.typeReference == child) {
			this.disown((AbstractNode) child);
			this.typeReference = null;
			return true;
		}
		if (this.rawArguments().remove(child)) return true;
		if (this.anonymousClassBody == child) {
			this.disown((AbstractNode) child);
			this.anonymousClassBody = null;
			return true;
		}
		return false;
	}
	
	@java.lang.Override public void accept(lombok.ast.AstVisitor visitor) {
		if (visitor.visitConstructorInvocation(this)) return;
		if (this.qualifier != null) this.qualifier.accept(visitor);
		for (lombok.ast.Node child : this.constructorTypeArguments.asIterable()) {
			child.accept(visitor);
		}
		if (this.typeReference != null) this.typeReference.accept(visitor);
		for (lombok.ast.Node child : this.arguments.asIterable()) {
			child.accept(visitor);
		}
		if (this.anonymousClassBody != null) this.anonymousClassBody.accept(visitor);
		visitor.afterVisitConstructorInvocation(this);
		visitor.endVisit(this);
	}
	
	@java.lang.Override public ConstructorInvocation copy() {
		ConstructorInvocation result = new ConstructorInvocation();
		result.parensPositions = new java.util.ArrayList(this.parensPositions);
		if (this.qualifier != null) result.rawQualifier(this.qualifier.copy());
		for (Node n : this.constructorTypeArguments.backingList()) {
			result.rawConstructorTypeArguments().addToEnd(n == null ? null : n.copy());
		}
		if (this.typeReference != null) result.rawTypeReference(this.typeReference.copy());
		for (Node n : this.arguments.backingList()) {
			result.rawArguments().addToEnd(n == null ? null : n.copy());
		}
		if (this.anonymousClassBody != null) result.rawAnonymousClassBody(this.anonymousClassBody.copy());
		return result;
	}
	
	public java.lang.String getDescription() {
		return lombok.ast.ConstructorInvocationTemplate.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);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy