View Javadoc
1 /****************************************************************************** 2 * Copyright (C) PicoContainer Organization. All rights reserved. * 3 * ------------------------------------------------------------------------- * 4 * The software in this package is published under the terms of the BSD * 5 * style license a copy of which has been included with this distribution in * 6 * the LICENSE.txt file. * 7 * * 8 * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant * 9 *****************************************************************************/ 10 package picocontainer.hierarchical; 11 12 import picocontainer.PicoInitializationException; 13 14 public class AmbiguousComponentResolutionException extends PicoInitializationException { 15 private final Class[] ambiguousClasses; 16 17 public AmbiguousComponentResolutionException(Class[] ambiguousClass) { 18 this.ambiguousClasses = ambiguousClass; 19 } 20 21 public String getMessage() { 22 String msg = "Ambiguous Classes:"; 23 for (int i = 0; i < ambiguousClasses.length; i++) { 24 Class ambiguousClass = ambiguousClasses[i]; 25 msg = msg + " " + ambiguousClass.getName(); 26 } 27 return msg; 28 } 29 30 public Class[] getAmbiguousClasses() { 31 return ambiguousClasses; 32 } 33 }

This page was automatically generated by Maven