|
Lines 4036-4042
Link Here
|
| 4036 |
int sfi = 0; |
4036 |
int sfi = 0; |
| 4037 |
for (int i = 0, length = methods.length; i < length; i++) { |
4037 |
for (int i = 0, length = methods.length; i < length; i++) { |
| 4038 |
MethodBinding method = methods[i]; |
4038 |
MethodBinding method = methods[i]; |
| 4039 |
|
4039 |
int paramLength = method.parameters.length; |
|
|
4040 |
boolean isVarArgs = method.isVarargs(); |
| 4041 |
if (argumentTypes.length != paramLength) |
| 4042 |
if (!isVarArgs || argumentTypes.length < paramLength - 1) |
| 4043 |
continue; // this method has number of arguments different from that used in the allocation |
| 4040 |
TypeVariableBinding[] methodTypeVariables = method.typeVariables(); |
4044 |
TypeVariableBinding[] methodTypeVariables = method.typeVariables(); |
| 4041 |
int methodTypeVariablesArity = methodTypeVariables.length; |
4045 |
int methodTypeVariablesArity = methodTypeVariables.length; |
| 4042 |
|
4046 |
|
|
Lines 4114-4119
Link Here
|
| 4114 |
staticFactories[sfi++] = new ParameterizedMethodBinding((ParameterizedTypeBinding) environment.convertToParameterizedType(staticFactory.declaringClass), |
4118 |
staticFactories[sfi++] = new ParameterizedMethodBinding((ParameterizedTypeBinding) environment.convertToParameterizedType(staticFactory.declaringClass), |
| 4115 |
staticFactory); |
4119 |
staticFactory); |
| 4116 |
} |
4120 |
} |
|
|
4121 |
if (sfi == 0) |
| 4122 |
return null; // no possible static factory methods found. So bail out. |
| 4117 |
if (sfi != methods.length) { |
4123 |
if (sfi != methods.length) { |
| 4118 |
System.arraycopy(staticFactories, 0, staticFactories = new MethodBinding[sfi], 0, sfi); |
4124 |
System.arraycopy(staticFactories, 0, staticFactories = new MethodBinding[sfi], 0, sfi); |
| 4119 |
} |
4125 |
} |