Class Utils


  • public class Utils
    extends Object
    Providing useful utility functions for build AnnotationSpec builder.
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • addIntCXXTemplate

        public static void addIntCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder)
      • addLongCXXTemplate

        public static void addLongCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder)
      • addSignedIntCXXTemplate

        public static void addSignedIntCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder)
      • addSignedLongCXXTemplate

        public static void addSignedLongCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder)
      • addDoubleCXXTemplate

        public static void addDoubleCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder)
      • addCXXTemplate

        public static void addCXXTemplate​(com.squareup.javapoet.AnnotationSpec.Builder builder,
                                          String foreignFirst,
                                          String foreignSecond,
                                          String javaFirst,
                                          String javaSecond)
      • addColumn

        public static void addColumn​(com.squareup.javapoet.AnnotationSpec.Builder batchBuilder,
                                     String foreignFragName,
                                     String javaFragName)
      • addSharedPtr

        public static void addSharedPtr​(com.squareup.javapoet.AnnotationSpec.Builder batchBuilder,
                                        String foreignFragName,
                                        String javaFragName)
      • makeParameterizedType

        public static String makeParameterizedType​(String base,
                                                   String... types)
      • vertexDataContextAddTemplate

        public static void vertexDataContextAddTemplate​(com.squareup.javapoet.AnnotationSpec.Builder vertexDataContextBuilder,
                                                        String foreignFragName,
                                                        String javaFragName)
      • getMessageTypes

        public static List<String> getMessageTypes()
        This property should be already set in environment.
        Returns:
      • parseMessageTypes

        public static String[] parseMessageTypes​(String messageTypes)
        Use : to separate types
        Parameters:
        messageTypes -
        Returns:
      • cpp2Java

        public static String cpp2Java​(String cppType)
      • java2Cpp

        public static String java2Cpp​(String javaType,
                                      boolean signed)