}
public Node createConstructorDeclaration(Node modifiers, Node typeParameters, Node name,
Node params, Node throwsHead, List<Node> throwsTail, Node body) {
ConstructorDeclaration decl = new ConstructorDeclaration().astTypeName(
createIdentifierIfNeeded(name, currentPos())).rawBody(body);
if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
if (typeParameters instanceof TemporaryNode.OrphanedTypeVariables) {
for (Node typeParameter : ((TemporaryNode.OrphanedTypeVariables)typeParameters).variables) {
decl.rawTypeVariables().addToEnd(typeParameter);
}
}
if (params instanceof TemporaryNode.MethodParameters) {
for (Node param : ((TemporaryNode.MethodParameters)params).parameters) {
decl.rawParameters().addToEnd(param);
}
} else DanglingNodes.addDanglingNode(decl, params);
if (throwsHead != null) decl.rawThrownTypeReferences().addToEnd(throwsHead);
if (throwsTail != null) for (Node n : throwsTail) if (n != null) decl.rawThrownTypeReferences().addToEnd(n);
return posify(decl);
}