IMethodBinding resolveConstructor(EnumConstantDeclaration enumConstantDeclaration) {
org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(enumConstantDeclaration);
if (node instanceof org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) {
org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration = (org.eclipse.jdt.internal.compiler.ast.FieldDeclaration) node;
if (fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT && fieldDeclaration.initialization != null) {
AllocationExpression allocationExpression = (AllocationExpression) fieldDeclaration.initialization;
return getMethodBinding(allocationExpression.binding);
}
}
return null;
}