Annotation Type GremlinDsl
-
@Target(TYPE) @Retention(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 extendsGraphTraversal
. This interface should be suffixed withTraversalDsl
. The DSL classes will be generated to the package of the annotated class or the to the value specified in thepackageName()
and will use the part of the interface name up to the suffix to generate the classes. Therefore, assuming an interface, annotated withGremlinDsl
, calledSocialTraversalDsl
, there will be three classes generated:SocialTraversal
- an interface that is an extension toSocialTraversalDsl
DefaultSocialTraversal
- an implementation of theSocialTraversal
SocialTraversalSource
- an extension ofGraphTraversalSource
which spawnsDefaultSocialTraversal
instances__
- which spawns anonymousDefaultSocialTraversal
instances
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
generateDefaultMethods
When set totrue
, which is the default, the following methods will be generated to the DSL implementation of theGraphTraversalSource
: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 theGraphTraversalSource
that this DSL should extend from.
-
-
-
Element Detail
-
packageName
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
String traversalSource
Defines the optional canonical name of theGraphTraversalSource
that this DSL should extend from. If this value is not supplied the generated "source" will simply extend fromGraphTraversalSource
.- Default:
- "org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource"
-
-
-
generateDefaultMethods
boolean generateDefaultMethods
When set totrue
, which is the default, the following methods will be generated to the DSL implementation of theGraphTraversalSource
:- Default:
- true
-
-