else
{
assert expression instanceof ClassInstanceCreation;
}
Signature signature= Project.getSingleton().getSignature(methodBinding.toString()).relative();
String signatureReplaced= normalizeExpression(signature);
print("dragomeJs.StringInit" + signatureReplaced + "(");
// print("dragomeJs.StringInit" + signature.getId() + "(");
generateList(invocation.getArguments());
print(")");
return;
}
if (invocation.isSuper(typeDecl.getClassName()))
{
// print(prefix);
// print(INVOKESUPER);
// print("(");
String string= "arguments.callee.self.superclass.prototype.{methodName}.call(this";
if (methodBinding.getDeclaringClass().referencesInterface())
{
String invokeClassName= normalizeExpression(methodBinding.getDeclaringClass());
string= invokeClassName+ ".$$members.{methodName}.call(this";
}
if (Modifier.isStatic(invocation.methodDecl.getAccess()))
string= "this.superclass.prototype.{methodName}.call(arguments[0]";
Signature signature= getSignatureOfInvocation(invocation);
String methodName= normalizeExpression(signature);
string= string.replace("{methodName}", methodName);
if (invocation.getArguments().isEmpty())
{
print(string);
print(")");
}
else
{
print(string);
print(", ");
generateList(invocation.getArguments());
print(")");
}
// print("this.");
// String declaringClass= normalizeExpression(methodBinding.getDeclaringClass().getClassName());
// print(declaringClass);
// print("_");
// // generateArguments(invocation);
// generateList(invocation.getArguments());
// print(")");
// superMethods.add(invocation);
// if (expression == null)
// {
// print("null");
// }
// else
// {
// expression.visit(this);
// }
// print(", ");
}
else if (invocation.isSpecial)
{
// print(getSignatureReference(Signature.getSignature(className)));
// print(", ");
if (methodBinding.isConstructor() && expression instanceof ThisExpression && !"java.lang.String".equals(className))
{
String normalizeExpression= normalizeExpression(className);
print(normalizeExpression);
print(".prototype.");
Signature signature= getSignatureOfInvocation(invocation);
print(normalizeExpression(signature));
print(".call(this");
if (!invocation.getArguments().isEmpty())
print(",");
generateList(invocation.getArguments());
print(")");
}
else
{
expression.visit(this);
print(".");
generateArguments(invocation);
}
}
else if (expression == null)
{
boolean isStatic= true;//Modifier.isStatic(invocation.methodDecl.getAccess());
Signature signature= Project.getSingleton().getSignature(methodBinding.getDeclaringClass().getClassName());
// if (isStatic)
// print("_getClassForStatic(");
print(normalizeExpression(signature));
// if (isStatic)
// {