Table of Contents

Class Bytecode

Namespace
Gremlin.Net.Process.Traversal
Assembly
Gremlin.Net.dll

A language agnostic representation of ITraversal mutations.

public class Bytecode
Inheritance
Bytecode
Derived
Inherited Members

Remarks

Bytecode is simply a list of ordered instructions. Bytecode can be serialized between environments and machines by way of a GraphSON representation. Thus, Gremlin.Net can create bytecode in C# and ship it to Gremlin-Java for evaluation in Java.

Constructors

Bytecode()

Initializes a new instance of the Bytecode class.

public Bytecode()

Bytecode(Bytecode)

Initializes a new instance of the Bytecode class.

public Bytecode(Bytecode byteCode)

Parameters

byteCode Bytecode

Already existing Bytecode that should be cloned.

Properties

SourceInstructions

Gets the traversal source instructions.

public List<Instruction> SourceInstructions { get; }

Property Value

List<Instruction>

StepInstructions

Gets the ITraversal instructions.

public List<Instruction> StepInstructions { get; }

Property Value

List<Instruction>

Methods

AddSource(string, params object?[])

Add a traversal source instruction to the bytecode.

public void AddSource(string sourceName, params object?[] args)

Parameters

sourceName string

The traversal source method name (e.g. withSack()).

args object[]

The traversal source method arguments.

AddStep(string, params object?[])

Adds a ITraversal instruction to the bytecode.

public void AddStep(string stepName, params object?[] args)

Parameters

stepName string

The traversal method name (e.g. out()).

args object[]

The traversal method arguments.

ToString()

public override string ToString()

Returns

string