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 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)