Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 package org.osgi.service.resolver;
Indicates failure to resolve a set of requirements.

If a resolution failure is caused by a missing mandatory dependency a resolver may include any requirements it has considered in the resolution exception. Clients may access this set of dependencies via the getUnresolvedRequirements() method.

Resolver implementations may extend this class to provide extra state information about the reason for the resolution failure.

$Id: 7e9dcb8cd9bd8e69ddfd27f13e7046df346c5f00 $
 public class ResolutionException extends Exception {
 	private static final long				serialVersionUID	= 1L;
 	private final transient Collection<Requirement>	unresolvedRequirements;

Create a ResolutionException with the specified message, cause and unresolved requirements.

message The message.
cause The cause of this exception.
unresolvedRequirements The unresolved mandatory requirements from mandatory resources or null if no unresolved requirements information is provided.
 	public ResolutionException(String messageThrowable causeCollection<RequirementunresolvedRequirements) {
 		if ((unresolvedRequirements == null) || unresolvedRequirements.isEmpty()) {
 			this. = null;
 		} else {
 			this. = Collections.unmodifiableCollection(new ArrayList<Requirement>(unresolvedRequirements));

Create a ResolutionException with the specified message.

message The message.
 	public ResolutionException(String message) {

Create a ResolutionException with the specified cause.

cause The cause of this exception.
 	public ResolutionException(Throwable cause) {
 	private static Collection<RequirementemptyCollection() {

Return the unresolved requirements, if any, for this exception.

The unresolved requirements are provided for informational purposes and the specific set of unresolved requirements that are provided after a resolve failure is not defined.

A collection of the unresolved requirements for this exception. The returned collection may be empty if no unresolved requirements information is available.
New to GrepCode? Check out our FAQ X