Skip to content

Commit

Permalink
Add this.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghislain Fourny committed Jul 12, 2024
1 parent 552d8ee commit 7f3213f
Show file tree
Hide file tree
Showing 45 changed files with 2,251 additions and 2,251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public StaticContext visitProlog(Prolog prolog, StaticContext argument) {
@Override
public StaticContext visitProgram(Program program, StaticContext argument) {
visitDescendants(program, argument);
ExecutionMode mergedExecutionMode = getHighestExecutionModeFromStatements(exitStatementChildren);
ExecutionMode mergedExecutionMode = getHighestExecutionModeFromStatements(this.exitStatementChildren);
program.setHighestExecutionMode(mergedExecutionMode);
return argument;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SequentialClassificationVisitor extends AbstractNodeVisitor<Descend
public SequentialClassificationVisitor(Prolog prolog) {
this.prolog = prolog;
this.blockLevel = 0;
variableBlockLevel = new HashMap<>();
this.variableBlockLevel = new HashMap<>();
}

protected DescendentSequentialProperties defaultAction(Node node, DescendentSequentialProperties argument) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/context/GlobalVariables.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class GlobalVariables implements Serializable, KryoSerializable {
private Set<Name> globalVariables;

public GlobalVariables() {
globalVariables = new HashSet<>();
this.globalVariables = new HashSet<>();
}

public void addGlobalVariable(Name globalVariable) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/context/InScopeVariable.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ public void read(Kryo kryo, Input input) {
}

public boolean isAssignable() {
return isAssignable;
return this.isAssignable;
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/context/StaticContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public InScopeSchemaTypes getInScopeSchemaTypes() {
}

public int getCurrentMutabilityLevel() {
return currentMutabilityLevel;
return this.currentMutabilityLevel;
}

public void setCurrentMutabilityLevel(int currentMutabilityLevel) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/expressions/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void setStaticSequenceType(SequenceType staticSequenceType) {
* @return Expression Classification of the expression.
*/
public ExpressionClassification getExpressionClassification() {
return expressionClassification;
return this.expressionClassification;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {

@Nullable
public List<Annotation> getAnnotations() {
return annotations;
return this.annotations;
}


public boolean isAssignable() {
return isAssignable;
return this.isAssignable;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public StatementsAndOptionalExpr getBody() {

@Nullable
public List<Annotation> getAnnotations() {
return annotations;
return this.annotations;
}

@Override
Expand Down Expand Up @@ -222,7 +222,7 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public boolean hasSequentialPropertyAnnotation() {
return hasSequentialPropertyAnnotation;
return this.hasSequentialPropertyAnnotation;
}

public void setHasExitStatement(boolean hasExitStatement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public Annotation(Name annotationName, List<Expression> literals) {
}

public Name getAnnotationName() {
return annotationName;
return this.annotationName;
}

public List<Expression> getLiterals() {
return literals;
return this.literals;
}

public static boolean checkAssignable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public <T> T accept(AbstractNodeVisitor<T> visitor, T argument) {
@Override
public List<Node> getChildren() {
List<Node> result = new ArrayList<>();
blockStatements.forEach(statement -> {
this.blockStatements.forEach(statement -> {
if (statement != null) {
result.add(statement);
}
Expand All @@ -49,6 +49,6 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public List<Statement> getBlockStatements() {
return blockStatements;
return this.blockStatements;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public Expression getTestCondition() {
return testCondition;
return this.testCondition;
}

public List<SwitchCaseStatement> getCases() {
return cases;
return this.cases;
}

public Statement getDefaultStatement() {
return defaultStatement;
return this.defaultStatement;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ public <T> T accept(AbstractNodeVisitor<T> visitor, T argument) {

@Override
public List<Node> getChildren() {
return new ArrayList<>(variables);
return new ArrayList<>(this.variables);
}

@Override
public void serializeToJSONiq(StringBuffer sb, int indent) {
indentIt(sb, indent);
for (VariableDeclStatement variableDeclStatement : variables) {
for (VariableDeclStatement variableDeclStatement : this.variables) {
variableDeclStatement.serializeToJSONiq(sb, 0);
}
}

public List<VariableDeclStatement> getVariables() {
return variables;
return this.variables;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ public Expression getVariableExpression() {
}

public List<Annotation> getAnnotations() {
return annotations;
return this.annotations;
}

public boolean isAssignable() {
return isAssignable;
return this.isAssignable;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public Expression getExitExpression() {
return exitExpression;
return this.exitExpression;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public ReturnStatementClause getReturnStatementClause() {
return returnStatementClause;
return this.returnStatementClause;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public Statement getReturnStatement() {
return returnStatement;
return this.returnStatement;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public <T> T accept(AbstractNodeVisitor<T> visitor, T argument) {
@Override
public List<Node> getChildren() {
List<Node> result = new ArrayList<>();
result.add(testCondition);
result.add(statement);
result.add(this.testCondition);
result.add(this.statement);
return result;
}

Expand All @@ -43,10 +43,10 @@ public void serializeToJSONiq(StringBuffer sb, int indent) {
}

public Expression getTestCondition() {
return testCondition;
return this.testCondition;
}

public Statement getStatement() {
return statement;
return this.statement;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public AppendExpression(
}

public Expression getArrayExpression() {
return arrayExpression;
return this.arrayExpression;
}

public Expression getToAppendExpression() {
return toAppendExpression;
return this.toAppendExpression;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public CopyDeclaration(
}

public Name getVariableName() {
return variableName;
return this.variableName;
}

public Expression getSourceExpression() {
return sourceExpression;
return this.sourceExpression;
}

public SequenceType getSourceSequenceType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public List<Node> getChildren() {
}

public Expression getMainExpression() {
return mainExpression;
return this.mainExpression;
}

public Expression getLocatorExpression() {
return locatorExpression;
return this.locatorExpression;
}


Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/rumbledb/expressions/update/InsertExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ public InsertExpression(
}

public boolean hasPositionExpression() {
return positionExpression != null;
return this.positionExpression != null;
}

public Expression getMainExpression() {
return mainExpression;
return this.mainExpression;
}

public Expression getToInsertExpression() {
return toInsertExpression;
return this.toInsertExpression;
}

public Expression getPositionExpression() {
if (positionExpression == null) {
if (this.positionExpression == null) {
throw new OurBadException("No position expression present in Insert Expression");
}
return positionExpression;
return this.positionExpression;
}

@Override
public List<Node> getChildren() {
return this.positionExpression == null
? Arrays.asList(mainExpression, toInsertExpression)
: Arrays.asList(mainExpression, toInsertExpression, positionExpression);
? Arrays.asList(this.mainExpression, this.toInsertExpression)
: Arrays.asList(this.mainExpression, this.toInsertExpression, this.positionExpression);
}

@Override
Expand All @@ -62,12 +62,12 @@ public <T> T accept(AbstractNodeVisitor<T> visitor, T argument) {
public void serializeToJSONiq(StringBuffer sb, int indent) {
indentIt(sb, indent);
sb.append("insert json ");
toInsertExpression.serializeToJSONiq(sb, 0);
this.toInsertExpression.serializeToJSONiq(sb, 0);
sb.append(" into ");
mainExpression.serializeToJSONiq(sb, 0);
this.mainExpression.serializeToJSONiq(sb, 0);
if (this.hasPositionExpression()) {
sb.append(" at position ");
positionExpression.serializeToJSONiq(sb, 0);
this.positionExpression.serializeToJSONiq(sb, 0);
}
sb.append("\n");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public List<Node> getChildren() {
}

public Expression getMainExpression() {
return mainExpression;
return this.mainExpression;
}

public Expression getLocatorExpression() {
return locatorExpression;
return this.locatorExpression;
}

public Expression getNameExpression() {
return nameExpression;
return this.nameExpression;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ public List<Node> getChildren() {
}

public Expression getMainExpression() {
return mainExpression;
return this.mainExpression;
}

public Expression getLocatorExpression() {
return locatorExpression;
return this.locatorExpression;
}

public Expression getReplacerExpression() {
return replacerExpression;
return this.replacerExpression;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public TransformExpression(
}

public List<CopyDeclaration> getCopyDeclarations() {
return copyDeclarations;
return this.copyDeclarations;
}

public List<Expression> getCopySourceExpressions() {
Expand All @@ -43,11 +43,11 @@ public List<Expression> getCopySourceExpressions() {
}

public Expression getModifyExpression() {
return modifyExpression;
return this.modifyExpression;
}

public Expression getReturnExpression() {
return returnExpression;
return this.returnExpression;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/items/ArrayItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public int getMutabilityLevel() {
@Override
public void setMutabilityLevel(int mutabilityLevel) {
this.mutabilityLevel = mutabilityLevel;
for (Item item : arrayItems) {
for (Item item : this.arrayItems) {
item.setMutabilityLevel(mutabilityLevel);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/rumbledb/items/ObjectItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public int getMutabilityLevel() {
@Override
public void setMutabilityLevel(int mutabilityLevel) {
this.mutabilityLevel = mutabilityLevel;
for (Item item : values) {
for (Item item : this.values) {
item.setMutabilityLevel(mutabilityLevel);
}
}
Expand Down
Loading

0 comments on commit 7f3213f

Please sign in to comment.