Top Description Fields Constructors Methods
org.osgi.service.resolver

public Class ResolutionException

extends Exception
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, org.osgi.resource.Requirement

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.

Author
$Id: 2bcc0ac8ebfaf169dd301493303d23ce613ac8b9 $

Field Summary

Modifier and TypeField and Description
private static final long
private final transient Collection<Requirement>

Constructor Summary

AccessConstructor and Description
public
ResolutionException(String
The message.
message
,
Throwable
The cause of this exception.
cause
,
Collection<Requirement>
The unresolved mandatory requirements from mandatory resources or null if no unresolved requirements information is provided.
unresolvedRequirements
)

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

public
ResolutionException(String
The message.
message
)

Create a ResolutionException with the specified message.

public
ResolutionException(Throwable
The cause of this exception.
cause
)

Create a ResolutionException with the specified cause.

Method Summary

Modifier and TypeMethod and Description
private static Collection<Requirement>
public Collection<Requirement>

Returns:

A collection of the unresolved requirements for this exception. The returned collection may be empty if no unresolved requirements information is available.
getUnresolvedRequirements
()

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

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

unresolvedRequirementsback to summary
private final transient Collection<Requirement> unresolvedRequirements

Constructor Detail

ResolutionExceptionback to summary
public ResolutionException(String message, Throwable cause, Collection<Requirement> unresolvedRequirements)

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

Parameters
message:String

The message.

cause:Throwable

The cause of this exception.

unresolvedRequirements:Collection<Requirement>

The unresolved mandatory requirements from mandatory resources or null if no unresolved requirements information is provided.

ResolutionExceptionback to summary
public ResolutionException(String message)

Create a ResolutionException with the specified message.

Parameters
message:String

The message.

ResolutionExceptionback to summary
public ResolutionException(Throwable cause)

Create a ResolutionException with the specified cause.

Parameters
cause:Throwable

The cause of this exception.

Method Detail

emptyCollectionback to summary
private static Collection<Requirement> emptyCollection()
Annotations
@SuppressWarnings:unchecked
getUnresolvedRequirementsback to summary
public Collection<Requirement> getUnresolvedRequirements()

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.

Returns:Collection<Requirement>

A collection of the unresolved requirements for this exception. The returned collection may be empty if no unresolved requirements information is available.