sourceEnd);
}
public void varargsArgumentNeedCast(MethodBinding method, TypeBinding argumentType, InvocationSite location) {
int severity = this.options.getSeverity(CompilerOptions.VarargsArgumentNeedCast);
if (severity == ProblemSeverities.Ignore) return;
ArrayBinding varargsType = (ArrayBinding)method.parameters[method.parameters.length-1];
if (method.isConstructor()) {
this.handle(
IProblem.ConstructorVarargsArgumentNeedCast,
new String[] {
new String(argumentType.readableName()),
new String(varargsType.readableName()),
new String(method.declaringClass.readableName()),
typesAsString(method, false),
new String(varargsType.elementsType().readableName()),
},
new String[] {
new String(argumentType.shortReadableName()),
new String(varargsType.shortReadableName()),
new String(method.declaringClass.shortReadableName()),
typesAsString(method, true),
new String(varargsType.elementsType().shortReadableName()),
},
severity,
location.sourceStart(),
location.sourceEnd());
} else {
this.handle(
IProblem.MethodVarargsArgumentNeedCast,
new String[] {
new String(argumentType.readableName()),
new String(varargsType.readableName()),
new String(method.selector),
typesAsString(method, false),
new String(method.declaringClass.readableName()),
new String(varargsType.elementsType().readableName()),
},
new String[] {
new String(argumentType.shortReadableName()),
new String(varargsType.shortReadableName()),
new String(method.selector), typesAsString(method, true),
new String(method.declaringClass.shortReadableName()),
new String(varargsType.elementsType().shortReadableName()),
},
severity,
location.sourceStart(),
location.sourceEnd());
}