Rev 93 | Rev 96 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 93 | Rev 94 | ||
---|---|---|---|
Line 319... | Line 319... | ||
319 | }
|
319 | }
|
320 | }
|
320 | }
|
321 | 321 | ||
322 | return (T) obj; |
322 | return (T) obj; |
323 | }
|
323 | }
|
- | 324 | ||
- | 325 | /*
|
|
- | 326 | private Constructor<? extends Object> findConstructor() {
|
|
- | 327 |
|
|
- | 328 | LinkedList<Class<? extends Object>> copy = new LinkedList<Class<? extends Object>>(initTypes);
|
|
- | 329 |
|
|
- | 330 | Constructor<? extends Object>[] constructors = klass.getConstructors();
|
|
- | 331 |
|
|
- | 332 | Constructor<? extends Object> found = null;
|
|
- | 333 |
|
|
- | 334 | for(Constructor<? extends Object> c : constructors) {
|
|
- | 335 |
|
|
- | 336 | Class<? extends Object>[] params = c.getParameterTypes();
|
|
- | 337 |
|
|
- | 338 | if (params == null || params.length == 0) continue; // skip default constructor for now...
|
|
- | 339 |
|
|
- | 340 | for(Class<? extends Object> p : params) {
|
|
- | 341 |
|
|
- | 342 | // first see if it was given...
|
|
- | 343 |
|
|
- | 344 | Class<? extends Object> given = copy.isEmpty() ? null : copy.get(0);
|
|
- | 345 |
|
|
- | 346 | if (p.equals(given)) {
|
|
- | 347 |
|
|
- | 348 | continue; // found param, let's check the other one...
|
|
- | 349 |
|
|
- | 350 | } else {
|
|
- | 351 |
|
|
- | 352 | // check auto-wiring...
|
|
- | 353 | }
|
|
- | 354 | }
|
|
- | 355 | }
|
|
- | 356 | }
|
|
- | 357 | */
|
|
324 | 358 | ||
325 | private static class DependencyKey { |
359 | private static class DependencyKey { |
326 | 360 | ||
327 | private String key; |
361 | private String key; |
328 | 362 |