org.apache.tinkerpop.gremlin.groovy.jsr223

## Class GroovyTranslator.DefaultTypeTranslator

- java.lang.Object
- - org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyTranslator.DefaultTypeTranslator

- All Implemented Interfaces:
    BiFunction<String,Object,Script>, Translator.ScriptTranslator.TypeTranslator
  Enclosing class:
    GroovyTranslator

      public static class GroovyTranslator.DefaultTypeTranslator
      extends Object
      implements Translator.ScriptTranslator.TypeTranslator

  Performs standard type translation for the TinkerPop types to Groovy.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Script` | `script`
    `protected boolean` | `withParameters`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultTypeTranslator(boolean withParameters)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Script` | `apply(String traversalSource, Object o)`
    `protected Script` | `convertPToScript(P p)`
    `protected Script` | `convertTextPToScript(TextP p)`
    `protected Script` | `convertToScript(Object object)` For each operator argument, if withParameters set true, try parametrization as follows: ----------------------------------------------- if unpack, why ? ObjectType ----------------------------------------------- (Yes) Bytecode.Binding (Recursion, No) Bytecode (Recursion, No) Traversal (Yes) String (Recursion, No) Set (Recursion, No) List (Recursion, No) Map (Yes) Long (Yes) Double (Yes) Float (Yes) Integer (Yes) Timestamp (Yes) Date (Yes) Uuid (Recursion, No) P (Enumeration, No) SackFunctions.Barrier (Enumeration, No) VertexProperty.Cardinality (Enumeration, No) TraversalOptionParent.Pick (Enumeration, No) Enum (Recursion, No) Vertex (Recursion, No) Edge (Recursion, No) VertexProperty (Yes) Lambda (Recursion, No) TraversalStrategyProxy (Enumeration, No) TraversalStrategy (Yes) Other -------------------------------------------------
    `protected Script` | `internalTranslate(String start, Bytecode bytecode)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.function.BiFunction

      `andThen`

- - ### Field Detail

    - #### withParameters

          protected final boolean withParameters

    - #### script

          protected final Script script

  - ### Constructor Detail

    - #### DefaultTypeTranslator

          public DefaultTypeTranslator(boolean withParameters)

  - ### Method Detail

    - #### apply

          public Script apply(String traversalSource,
                              Object o)

      Specified by:
        `apply` in interface `BiFunction<String,Object,Script>`

    - #### convertToScript

          protected Script convertToScript(Object object)

      For each operator argument, if withParameters set true, try parametrization as follows: ----------------------------------------------- if unpack, why ? ObjectType ----------------------------------------------- (Yes) Bytecode.Binding (Recursion, No) Bytecode (Recursion, No) Traversal (Yes) String (Recursion, No) Set (Recursion, No) List (Recursion, No) Map (Yes) Long (Yes) Double (Yes) Float (Yes) Integer (Yes) Timestamp (Yes) Date (Yes) Uuid (Recursion, No) P (Enumeration, No) SackFunctions.Barrier (Enumeration, No) VertexProperty.Cardinality (Enumeration, No) TraversalOptionParent.Pick (Enumeration, No) Enum (Recursion, No) Vertex (Recursion, No) Edge (Recursion, No) VertexProperty (Yes) Lambda (Recursion, No) TraversalStrategyProxy (Enumeration, No) TraversalStrategy (Yes) Other -------------------------------------------------
      Parameters:
        `object` -
      Returns:
        String Repres

    - #### internalTranslate

          protected Script internalTranslate(String start,
                                             Bytecode bytecode)

    - #### convertPToScript

          protected Script convertPToScript(P p)

    - #### convertTextPToScript

          protected Script convertTextPToScript(TextP p)

Copyright © 2013–2021 Apache Software Foundation. All rights reserved.