@Target(value=TYPE) @Retention(value=CLASS) public @interface GremlinDsl
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
instancesModifier 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...)
|
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. |
public abstract String packageName
public abstract String traversalSource
GraphTraversalSource
that this DSL should extend from. If
this value is not supplied the generated "source" will simply extend from GraphTraversalSource
.public abstract boolean generateDefaultMethods
true
, which is the default, the following methods will be generated to the DSL
implementation of the GraphTraversalSource
:
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.