Annotation 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 toSocialTraversalDslDefaultSocialTraversal- an implementation of theSocialTraversalSocialTraversalSource- an extension ofGraphTraversalSourcewhich spawnsDefaultSocialTraversalinstances__- which spawns anonymousDefaultSocialTraversalinstances
- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceAnnotation that allows the user to directly override the type parameters on generated anonymous methods. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhen set totrue, which is the default, the following methods will be generated to the DSL implementation of theGraphTraversalSource:GraphTraversalSource.addV()GraphTraversalSource.addV(String, String[])GraphTraversalSource.V(Object...)GraphTraversalSource.E(Object...)GraphTraversalSource.inject(Object...)GraphTraversalSource.getAnonymousTraversalClass()The default package name in which to generate the DSL.Defines the optional canonical name of theGraphTraversalSourcethat this DSL should extend from.
-
Element Details
-
packageName
String packageNameThe 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 traversalSourceDefines the optional canonical name of theGraphTraversalSourcethat 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 generateDefaultMethodsWhen set totrue, which is the default, the following methods will be generated to the DSL implementation of theGraphTraversalSource:- Default:
- true
-