org.apache.tinkerpop.gremlin.process.traversal

## Class AnonymousTraversalSource<T extends TraversalSource>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource<T>

-     public class AnonymousTraversalSource<T extends TraversalSource>
      extends Object

  Provides a unified way to construct a `TraversalSource` from the perspective of the traversal. In this syntax the user is creating the source and binding it to a reference which is either an existing `Graph` instance or a `RemoteConnection`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static AnonymousTraversalSource<GraphTraversalSource>` | `traversal()` Constructs an `AnonymousTraversalSource` which will then be configured to spawn a `GraphTraversalSource`.
    `static <T extends TraversalSource> AnonymousTraversalSource<T>` | `traversal(Class<T> traversalSourceClass)` Constructs an `AnonymousTraversalSource` which will then be configured to spawn the specified `TraversalSource`.
    `T` | `withGraph(Graph graph)` Creates the specified `TraversalSource` binding a `Graph` as its reference such that traversals spawned from it will execute over that reference.
    `T` | `withRemote(Configuration conf)` Creates the specified `TraversalSource` binding a `RemoteConnection` as its reference such that traversals spawned from it will execute over that reference.
    `T` | `withRemote(String configFile)` Creates the specified `TraversalSource` binding a `RemoteConnection` as its reference such that traversals spawned from it will execute over that reference.

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

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

- - ### Method Detail

    - #### traversal

          public static AnonymousTraversalSource<GraphTraversalSource> traversal()

      Constructs an `AnonymousTraversalSource` which will then be configured to spawn a `GraphTraversalSource`.

    - #### traversal

          public static <T extends TraversalSource> AnonymousTraversalSource<T> traversal(Class<T> traversalSourceClass)

      Constructs an `AnonymousTraversalSource` which will then be configured to spawn the specified `TraversalSource`.

    - #### withRemote

          public T withRemote(String configFile)
                       throws Exception

      Creates the specified `TraversalSource` binding a `RemoteConnection` as its reference such that traversals spawned from it will execute over that reference.
      Throws:
        `Exception`

    - #### withRemote

          public T withRemote(Configuration conf)

      Creates the specified `TraversalSource` binding a `RemoteConnection` as its reference such that traversals spawned from it will execute over that reference.

    - #### withGraph

          public T withGraph(Graph graph)

      Creates the specified `TraversalSource` binding a `Graph` as its reference such that traversals spawned from it will execute over that reference.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.