mirror of
https://github.com/github/codeql.git
synced 2026-07-12 15:05:33 +02:00
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:
@@ -1,10 +1,9 @@
|
||||
package com.semmle.js.ast;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.semmle.ts.ast.ITypeExpression;
|
||||
import com.semmle.ts.ast.TypeParameter;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A class declaration such as
|
||||
@@ -19,48 +18,61 @@ import com.semmle.ts.ast.TypeParameter;
|
||||
* </pre>
|
||||
*/
|
||||
public class ClassDeclaration extends Statement {
|
||||
private final AClass klass;
|
||||
private final boolean hasDeclareKeyword;
|
||||
private final boolean hasAbstractKeyword;
|
||||
private final AClass klass;
|
||||
private final boolean hasDeclareKeyword;
|
||||
private final boolean hasAbstractKeyword;
|
||||
|
||||
public ClassDeclaration(SourceLocation loc, Identifier id, Expression superClass, ClassBody body) {
|
||||
this(loc, id, Collections.emptyList(), superClass, Collections.emptyList(), body, false, false);
|
||||
}
|
||||
public ClassDeclaration(
|
||||
SourceLocation loc, Identifier id, Expression superClass, ClassBody body) {
|
||||
this(loc, id, Collections.emptyList(), superClass, Collections.emptyList(), body, false, false);
|
||||
}
|
||||
|
||||
public ClassDeclaration(SourceLocation loc, Identifier id, List<TypeParameter> typeParameters, Expression superClass,
|
||||
List<ITypeExpression> superInterfaces, ClassBody body, boolean hasDeclareKeyword, boolean hasAbstractKeyword) {
|
||||
this(loc, new AClass(id, typeParameters, superClass, superInterfaces, body), hasDeclareKeyword, hasAbstractKeyword);
|
||||
}
|
||||
public ClassDeclaration(
|
||||
SourceLocation loc,
|
||||
Identifier id,
|
||||
List<TypeParameter> typeParameters,
|
||||
Expression superClass,
|
||||
List<ITypeExpression> superInterfaces,
|
||||
ClassBody body,
|
||||
boolean hasDeclareKeyword,
|
||||
boolean hasAbstractKeyword) {
|
||||
this(
|
||||
loc,
|
||||
new AClass(id, typeParameters, superClass, superInterfaces, body),
|
||||
hasDeclareKeyword,
|
||||
hasAbstractKeyword);
|
||||
}
|
||||
|
||||
public ClassDeclaration(SourceLocation loc, AClass klass, boolean hasDeclareKeyword, boolean hasAbstractKeyword) {
|
||||
super("ClassDeclaration", loc);
|
||||
this.klass = klass;
|
||||
this.hasDeclareKeyword = hasDeclareKeyword;
|
||||
this.hasAbstractKeyword = hasAbstractKeyword;
|
||||
}
|
||||
public ClassDeclaration(
|
||||
SourceLocation loc, AClass klass, boolean hasDeclareKeyword, boolean hasAbstractKeyword) {
|
||||
super("ClassDeclaration", loc);
|
||||
this.klass = klass;
|
||||
this.hasDeclareKeyword = hasDeclareKeyword;
|
||||
this.hasAbstractKeyword = hasAbstractKeyword;
|
||||
}
|
||||
|
||||
public AClass getClassDef() {
|
||||
return klass;
|
||||
}
|
||||
public AClass getClassDef() {
|
||||
return klass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <C, R> R accept(Visitor<C, R> v, C c) {
|
||||
return v.visit(this, c);
|
||||
}
|
||||
@Override
|
||||
public <C, R> R accept(Visitor<C, R> v, C c) {
|
||||
return v.visit(this, c);
|
||||
}
|
||||
|
||||
public void addDecorators(List<Decorator> decorators) {
|
||||
klass.addDecorators(decorators);
|
||||
}
|
||||
public void addDecorators(List<Decorator> decorators) {
|
||||
klass.addDecorators(decorators);
|
||||
}
|
||||
|
||||
public List<Decorator> getDecorators() {
|
||||
return klass.getDecorators();
|
||||
}
|
||||
public List<Decorator> getDecorators() {
|
||||
return klass.getDecorators();
|
||||
}
|
||||
|
||||
public boolean hasDeclareKeyword() {
|
||||
return hasDeclareKeyword;
|
||||
}
|
||||
public boolean hasDeclareKeyword() {
|
||||
return hasDeclareKeyword;
|
||||
}
|
||||
|
||||
public boolean hasAbstractKeyword() {
|
||||
return hasAbstractKeyword;
|
||||
}
|
||||
public boolean hasAbstractKeyword() {
|
||||
return hasAbstractKeyword;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user