org.apache.tinkerpop.gremlin.process.traversal.dsl

## Annotation Type GremlinDsl

-     @Target(value=TYPE)
       @Retention(value=CLASS)
      public @interface GremlinDsl

  An annotation that specifies that an interface is meant to be used to produce Gremlin DSL. This annotation should be applied to an interface that extends `GraphTraversal`. This interface should be suffixed with `TraversalDsl`. The DSL classes will be generated to the package of the annotated class or the to the value specified in the `packageName()` and will use the part of the interface name up to the suffix to generate the classes. Therefore, assuming an interface, annotated with `GremlinDsl`, called `SocialTraversalDsl`, there will be three classes generated:
  - `SocialTraversal` - an interface that is an extension to `SocialTraversalDsl`
  - `DefaultSocialTraversal` - an implementation of the `SocialTraversal`
  - `SocialTraversalSource` - an extension of `GraphTraversalSource` which spawns `DefaultSocialTraversal` instances
  - `__` - which spawns anonymous `DefaultSocialTraversal` instances
  Together these generated classes provide all the infrastructure required to properly Gremlin traversals enhanced with domain specific steps.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `generateDefaultMethods` When set to `true`, which is the default, the following methods will be generated to the DSL implementation of the `GraphTraversalSource`: `GraphTraversalSource.addV()` `GraphTraversalSource.addV(String)` `GraphTraversalSource.V(Object...)` `GraphTraversalSource.E(Object...)` `GraphTraversalSource.inject(Object...)` `GraphTraversalSource.getAnonymousTraversalClass()`
    `String` | `packageName` The default package name in which to generate the DSL.
    `String` | `traversalSource` Defines the optional canonical name of the `GraphTraversalSource` that this DSL should extend from.

- - ### Element Detail

    - #### packageName

          public abstract String packageName

      The default package name in which to generate the DSL. If this value is left unset or set to an empty string, it will default to the same package as the class or interface the annotation is on.
      Default:
        ""

  - - #### traversalSource

          public abstract String traversalSource

      Defines the optional canonical name of the `GraphTraversalSource` that this DSL should extend from. If this value is not supplied the generated "source" will simply extend from `GraphTraversalSource`.
      Default:
        "org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource"

  - - #### generateDefaultMethods

          public abstract boolean generateDefaultMethods

      When set to `true`, which is the default, the following methods will be generated to the DSL implementation of the `GraphTraversalSource`:
      - `GraphTraversalSource.addV()`
      - `GraphTraversalSource.addV(String)`
      - `GraphTraversalSource.V(Object...)`
      - `GraphTraversalSource.E(Object...)`
      - `GraphTraversalSource.inject(Object...)`
      - `GraphTraversalSource.getAnonymousTraversalClass()`
      Default:
        true

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