lombok.ast.Synchronized Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lombok-pg Show documentation
Show all versions of lombok-pg Show documentation
lombok-pg is a collection of extensions to Project Lombok
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