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

lombok.ast.Synchronized Maven / Gradle / Ivy

There is a newer version: 0.11.3
Show newest version
package lombok.ast;

import java.util.ArrayList;
import java.util.List;

import lombok.Getter;

@Getter
public class Synchronized extends Statement {
	private final Expression lock;
	private final List> statements = new ArrayList>();

	public Synchronized(final Expression lock) {
		this.lock = child(lock);
	}

	public Synchronized withStatement(final Statement statement) {
		statements.add(child(statement));
		return this;
	}

	public Synchronized withStatements(final List> statements) {
		for (Statement statement : statements) withStatement(statement);
		return this;
	}

	@Override
	public  RETURN_TYPE accept(final ASTVisitor v, final PARAMETER_TYPE p) {
		return v.visitSynchronized(this, p);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy