org.apache.felix.resolver.reason

## Enum ReasonException.Reason

- java.lang.Object
- - java.lang.Enum<ReasonException.Reason>
  - - org.apache.felix.resolver.reason.ReasonException.Reason

All Implemented Interfaces:
  Serializable, Comparable<ReasonException.Reason>

Enclosing class:
  ReasonException

    public static enum ReasonException.Reason
    extends Enum<ReasonException.Reason>

The reasons for resolution failure.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`DynamicImport` Represents an unresolved package referenced by `Dynamic-ImportPackage`.
`FragmentNotSelected` Represents the scenario where a fragment matches a host but is not selected because another fragment with the same `Bundle-SymbolicName` already matched, usually a fragment of a higher version.
`MissingRequirement` Represents the scenario where a requirement could not be resolved.
`UseConstraint` Represents a failure in the use constraints of a bundle.

### Method Summary

All Methods Static Methods Concrete Methods
`static ReasonException.Reason` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static ReasonException.Reason[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### DynamicImport

    public static final ReasonException.Reason DynamicImport

Represents an unresolved package referenced by `Dynamic-ImportPackage`.

`ResolutionException.getUnresolvedRequirements()` will return a collection containing the single `osgi.wiring.package;resolution:=dynamic` requirement which failed to resolve.

This reason has no a transitive cause.

#### FragmentNotSelected

    public static final ReasonException.Reason FragmentNotSelected

Represents the scenario where a fragment matches a host but is not selected because another fragment with the same `Bundle-SymbolicName` already matched, usually a fragment of a higher version.

`ResolutionException.getUnresolvedRequirements()` will return a collection containing the single `osgi.wiring.host` requirement of the fragment.

This reason has no a transitive cause.

#### MissingRequirement

    public static final ReasonException.Reason MissingRequirement

Represents the scenario where a requirement could not be resolved.

`ResolutionException.getUnresolvedRequirements()` will return a collection containing a single requirement that didn't resolve.

This reason may have a transitive cause.

#### UseConstraint

    public static final ReasonException.Reason UseConstraint

Represents a failure in the use constraints of a bundle.

`ResolutionException.getUnresolvedRequirements()` will return a collection containing a single requirement to blame for the use constraint violation.

This reason has no a transitive cause.

### Method Detail

#### values

    public static ReasonException.Reason[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (ReasonException.Reason c : ReasonException.Reason.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static ReasonException.Reason valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null