|
From: snpe <sn...@sn...> - 2005-06-04 22:43:51
|
I use lats springide trunk and have problem when bena have implicit constructor
(no defined constructor).
spring ide return error " no constructor with 0 argument
I change org.springframework.ide.eclipse.beans.core.internal.Introspector#hasConstructor
method and it work now
public static boolean hasConstructor(IType type, int argCount)
throws JavaModelException {
boolean haveImplicitCursor = (argCount == 0);
IMethod[] methods = type.getMethods();
for (int i = 0; i < methods.length; i++) {
IMethod method = methods[i];
if (method.isConstructor() &&
method.getNumberOfParameters() == argCount) {
int flags = method.getFlags();
if (Flags.isPublic(flags) ) {
return true;
}
if (haveImplicitCursor)
return false;
}
}
return haveImplicitCursor;
}
|