org.apache.felix.rootcause

## Class DSRootCause

- java.lang.Object
- - org.apache.felix.rootcause.DSRootCause

    public class DSRootCause
    extends Object

Utility class to get the root cause for declarative services.

### Constructor Summary

Constructors
Constructor and Description
`DSRootCause(org.osgi.service.component.runtime.ServiceComponentRuntime scr)` Create new instance

### Method Summary

All Methods Instance Methods Concrete Methods
`DSComp` `getRootCause(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO desc)` Get the root cause for a component description
`DSComp` `getRootCause(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO desc, Collection<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> allDTOs)` Get the root cause for a component description
`Optional<DSComp>` `getRootCause(String iface)` Get the root cause based on an interface name
`Optional<DSComp>` `getRootCause(String iface, Collection<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> allDTOs)` Get the root cause based on an interface name

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DSRootCause

    public DSRootCause(org.osgi.service.component.runtime.ServiceComponentRuntime scr)

Create new instance

Parameters:
  `scr` - Service component runtime

### Method Detail

#### getRootCause

    public Optional<DSComp> getRootCause(String iface)

Get the root cause based on an interface name

Parameters:
  `iface` - The interface name
Returns:
  Optional root cause

#### getRootCause

    public Optional<DSComp> getRootCause(String iface,
                                         Collection<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> allDTOs)

Get the root cause based on an interface name

Parameters:
  `iface` - The interface name
  `allDTOs` - A collection with all dtos as a cache to lookup, optional
Returns:
  Optional root cause
Since:
  0.2.0

#### getRootCause

    public DSComp getRootCause(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO desc)

Get the root cause for a component description

Parameters:
  `desc` - The description
Returns:
  The root cause

#### getRootCause

    public DSComp getRootCause(org.osgi.service.component.runtime.dto.ComponentDescriptionDTO desc,
                               Collection<org.osgi.service.component.runtime.dto.ComponentDescriptionDTO> allDTOs)

Get the root cause for a component description

Parameters:
  `desc` - The description
  `allDTOs` - A collection with all dtos as a cache to lookup, optional
Returns:
  The root cause
Since:
  0.2.0