Skip to content

Commit

Permalink
regenerated file with Xtend annotation
Browse files Browse the repository at this point in the history
follow-up of eclipse-xtext#2784
  • Loading branch information
LorenzoBettini committed Apr 25, 2024
1 parent 460fd5e commit 0ba9017
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,7 @@ public void setBody(final StringConcatenationClient compilationTemplate) {
}

public MutableParameterDeclaration addParameter(final String name, final TypeReference type) {
this.checkMutable();
ConditionUtils.checkJavaIdentifier(name, "name");
Preconditions.checkArgument((type != null), "type cannot be null");
boolean _isInferred = type.isInferred();
if (_isInferred) {
throw new IllegalArgumentException("Cannot use inferred type as parameter type.");
}
final JvmFormalParameter param = TypesFactory.eINSTANCE.createJvmFormalParameter();
param.setName(name);
param.setParameterType(this.getCompilationUnit().toJvmTypeReference(type));
this.getDelegate().getParameters().add(param);
ParameterDeclaration _parameterDeclaration = this.getCompilationUnit().toParameterDeclaration(param);
return ((MutableParameterDeclaration) _parameterDeclaration);
return this.addParameter(this.getDelegate().getParameters().size(), name, type);
}

public MutableParameterDeclaration addParameter(final int index, final String name, final TypeReference type) {
Expand Down

0 comments on commit 0ba9017

Please sign in to comment.