DependencyResolver.Adapter (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.graphdb

## Class DependencyResolver.Adapter

- java.lang.Object
- - org.neo4j.graphdb.DependencyResolver.Adapter

- All Implemented Interfaces:
    DependencyResolver
  Enclosing interface:
    DependencyResolver

      public abstract static class DependencyResolver.Adapter
      extends Object
      implements DependencyResolver

  Adapter for `DependencyResolver` which will select the first available candidate by default for `resolveDependency(Class)`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.neo4j.graphdb.DependencyResolver

      `DependencyResolver.Adapter, DependencyResolver.SelectionStrategy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DependencyResolver.Adapter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `resolveDependency(Class<T> type)` Tries to resolve a dependency that matches a given class.

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

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

    - ### Methods inherited from interface org.neo4j.graphdb.DependencyResolver

      `resolveDependency`

- - ### Constructor Detail

    - #### DependencyResolver.Adapter

          public DependencyResolver.Adapter()

  - ### Method Detail

    - #### resolveDependency

          public <T> T resolveDependency(Class<T> type)
                              throws IllegalArgumentException

      Description copied from interface: `DependencyResolver`
      Tries to resolve a dependency that matches a given class. No specific `DependencyResolver.SelectionStrategy` is used, so the first encountered matching dependency will be returned.
      Specified by:
        `resolveDependency` in interface `DependencyResolver`
      Parameters:
        `type` - the type of `Class` that the returned instance must implement.
      Returns:
        the resolved dependency for the given type.
      Throws:
        `IllegalArgumentException` - if no matching dependency was found.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.