public boolean visit(ConstructorDeclaration ctorDecl, ClassScope scope) {
try {
MethodBinding b = ctorDecl.binding;
JClassType enclosingType = (JClassType) typeMap.get(scope.enclosingSourceType());
String name = enclosingType.getShortName();
SourceInfo info = makeSourceInfo(ctorDecl, enclosingType);
JMethod newMethod = program.createMethod(info, name.toCharArray(),
enclosingType, enclosingType, false, false, true, b.isPrivate(),
false);
// Enums have hidden arguments for name and value
if (enclosingType.isEnumOrSubclass() != null) {
program.createParameter(info, "enum$name".toCharArray(),
program.getTypeJavaLangString(), true, false, newMethod);
program.createParameter(info, "enum$ordinal".toCharArray(),
program.getTypePrimitiveInt(), true, false, newMethod);
}
// user args
mapParameters(newMethod, ctorDecl);
// original params are now frozen
info.addCorrelation(program.getCorrelator().by(newMethod));
int syntheticParamCount = 0;
ReferenceBinding declaringClass = b.declaringClass;
if (declaringClass.isNestedType() && !declaringClass.isStatic()) {
// add synthetic args for outer this and locals