/** * Constructs a <code>ThrowableSet</code> which contains the exception types represented in <code> * include</code>, except for those which are also in <code>exclude</code>. The constructor is * private to ensure that the only way to get a new <code>ThrowableSet</code> is by adding * elements to or removing them from an existing set. * * @param include The set of {@link RefType} and {@link AnySubType} objects representing the types * to be included in the set. * @param exclude The set of {@link AnySubType} objects representing the types to be excluded from * the set. */ private ThrowableSet(Set include, Set exclude) { exceptionsIncluded = Collections.unmodifiableSet(include); exceptionsExcluded = Collections.unmodifiableSet(exclude); // We don't need to clone include and exclude to guarantee // immutability since ThrowableSet(Set,Set) is private to this // class, where it is only called (via // Manager.v().registerSetIfNew()) with arguments which the // callers do not subsequently modify. }