Description
in GremlinDslProcessor class , when generating traversalSource
at generateTraversalSource method addV should be replaced by addE
traversalSourceClass.addMethod(MethodSpec.methodBuilder("addE")
.addModifiers(Modifier.PUBLIC)
.addAnnotation(Override.class)
.addParameter(String.class, "label")
.addStatement("$N clone = this.clone()", ctx.traversalSourceClazz)
.addStatement("clone.getBytecode().addStep($T.addV, label)", GraphTraversal.Symbols.class)
.addStatement("$N traversal = new $N(clone)", ctx.defaultTraversalClazz, ctx.defaultTraversalClazz)
.addStatement("return ($T) traversal.asAdmin().addStep(new $T(traversal, label))", ctx.traversalClassName, AddEdgeStartStep.class)
.returns(ParameterizedTypeName.get(ctx.traversalClassName, ClassName.get(Edge.class), ClassName.get(Edge.class)))
.build());
Attachments
Issue Links
- links to