MethodBinding b = x.binding;
JMethod ctor = (JMethod) typeMap.get(b);
JClassType enclosingType = (JClassType) ctor.getEnclosingType();
JNewInstance newInstance = new JNewInstance(info, enclosingType);
JMethodCall call = new JMethodCall(info, newInstance, ctor);
JExpression qualifier = dispProcessExpression(x.enclosingInstance);
List<JExpression> qualList = new ArrayList<JExpression>();
qualList.add(qualifier);
/*
* Really weird: Sometimes an allocation expression needs both its
* explicit qualifier AND its implicit enclosing class! We add this second
* because the explicit qualifier takes precedence.
*/
if (!currentMethod.isStatic()) {
JExpression implicitOuter = program.getExprThisRef(info,
(JClassType) currentClass);
qualList.add(implicitOuter);
}
// Plain old regular arguments