JavaScript: Autoformat extractor sources using google-java-format.

No special settings; command:

  find javascript/extractor/src -name "*.java" | xargs java -jar /path/to/google-java-format-1.7-all-deps.jar --replace
This commit is contained in:
Max Schaefer
2019-02-28 14:30:06 +00:00
parent 5478e0da62
commit c4fa29dd0f
304 changed files with 30389 additions and 30395 deletions

View File

@@ -1,49 +1,40 @@
package com.semmle.js.ast;
/**
* An if statement.
*/
/** An if statement. */
public class IfStatement extends Statement {
private final Expression test;
private final Statement consequent, alternate;
private final Expression test;
private final Statement consequent, alternate;
public IfStatement(SourceLocation loc, Expression test, Statement consequent, Statement alternate) {
super("IfStatement", loc);
this.test = test;
this.consequent = consequent;
this.alternate = alternate;
}
public IfStatement(
SourceLocation loc, Expression test, Statement consequent, Statement alternate) {
super("IfStatement", loc);
this.test = test;
this.consequent = consequent;
this.alternate = alternate;
}
@Override
public <Q, A> A accept(Visitor<Q, A> v, Q q) {
return v.visit(this, q);
}
@Override
public <Q, A> A accept(Visitor<Q, A> v, Q q) {
return v.visit(this, q);
}
/**
* The test expression of this if statement.
*/
public Expression getTest() {
return test;
}
/** The test expression of this if statement. */
public Expression getTest() {
return test;
}
/**
* The then-branch of this if statement.
*/
public Statement getConsequent() {
return consequent;
}
/** The then-branch of this if statement. */
public Statement getConsequent() {
return consequent;
}
/**
* The else-branch of this if statement; may be null.
*/
public Statement getAlternate() {
return alternate;
}
/** The else-branch of this if statement; may be null. */
public Statement getAlternate() {
return alternate;
}
/**
* Does this if statement have an else branch?
*/
public boolean hasAlternate() {
return alternate != null;
}
/** Does this if statement have an else branch? */
public boolean hasAlternate() {
return alternate != null;
}
}