From 8b38367727510c5b4b2025e4a60dce0038a4ba74 Mon Sep 17 00:00:00 2001 From: Danny van Bruggen Date: Fri, 20 Oct 2017 18:05:43 +0200 Subject: Add old constructor back --- .../java/com/github/javaparser/ast/body/MethodDeclaration.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java index 3ab2097a2..dc701e68a 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java @@ -81,6 +81,10 @@ public final class MethodDeclaration extends CallableDeclaration(), new NodeList<>(), type, new SimpleName(name), parameters, new NodeList<>(), new BlockStmt(), null); } + public MethodDeclaration(final EnumSet modifiers, final NodeList annotations, final NodeList typeParameters, final Type type, final SimpleName name, final NodeList parameters, final NodeList thrownExceptions, final BlockStmt body) { + this(null, modifiers, annotations, typeParameters, type, name, parameters, thrownExceptions, body, null); + } + @AllFieldsConstructor public MethodDeclaration(final EnumSet modifiers, final NodeList annotations, final NodeList typeParameters, final Type type, final SimpleName name, final NodeList parameters, final NodeList thrownExceptions, final BlockStmt body, ReceiverParameter receiverParameter) { this(null, modifiers, annotations, typeParameters, type, name, parameters, thrownExceptions, body, receiverParameter); @@ -93,7 +97,9 @@ public final class MethodDeclaration extends CallableDeclaration modifiers, NodeList annotations, NodeList typeParameters, Type type, SimpleName name, NodeList parameters, NodeList thrownExceptions, BlockStmt body, ReceiverParameter receiverParameter) { super(tokenRange, modifiers, annotations, typeParameters, name, parameters, thrownExceptions); -- cgit v1.2.3