Class ConverterTemplate


  • class ConverterTemplate
    extends java.lang.Object
    • Field Detail

      • code

        private final java.io.Writer code
      • context

        private final Context context
    • Constructor Detail

    • Method Detail

      • isStaticEnum

        private boolean isStaticEnum​(AttributeInfo attr)
      • factoryForGenericConverter

        void factoryForGenericConverter​(StructInfo si)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • createConverter

        private void createConverter​(StructInfo si,
                                     java.lang.String typeName,
                                     java.lang.String typeArguments)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • asFormatConverter

        private void asFormatConverter​(StructInfo si,
                                       java.lang.String name,
                                       java.lang.String className,
                                       boolean binding)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • extractTypeSignature

        private java.lang.String extractTypeSignature​(AttributeInfo attr,
                                                      javax.lang.model.type.TypeMirror type,
                                                      java.util.Map<java.lang.String,​javax.lang.model.type.TypeMirror> genericSignatures)
      • extractSingleType

        private java.lang.String extractSingleType​(AttributeInfo attr,
                                                   @Nullable
                                                   java.util.List<java.lang.String> types)
      • createLazyReaderAndWriter

        private void createLazyReaderAndWriter​(AttributeInfo attr,
                                               javax.lang.model.type.TypeMirror mirror,
                                               java.lang.String namePrefix,
                                               StructInfo si)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • createTypeSignature

        private java.lang.String createTypeSignature​(javax.lang.model.type.TypeMirror type,
                                                     java.util.Map<java.lang.String,​java.lang.Integer> typeVariableIndexes,
                                                     java.util.Map<java.lang.String,​javax.lang.model.type.TypeMirror> genericSignatures)
      • createTypeSignature

        private void createTypeSignature​(javax.lang.model.type.TypeMirror type,
                                         java.util.Map<java.lang.String,​java.lang.Integer> typeVariableIndexes,
                                         java.util.Map<java.lang.String,​javax.lang.model.type.TypeMirror> genericSignatures,
                                         java.lang.StringBuilder builder)
      • buildArrayType

        private void buildArrayType​(javax.lang.model.type.TypeMirror type,
                                    java.util.Map<java.lang.String,​java.lang.Integer> typeVariableIndexes,
                                    java.util.Map<java.lang.String,​javax.lang.model.type.TypeMirror> genericSignatures)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • emptyObject

        void emptyObject​(StructInfo si,
                         java.lang.String className)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • fromObject

        void fromObject​(StructInfo si,
                        java.lang.String className)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • writeDiscriminator

        private void writeDiscriminator​(StructInfo si)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • writeObject

        private void writeObject​(StructInfo si,
                                 java.lang.String className,
                                 java.util.List<AttributeInfo> sortedAttributes)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • checkMandatory

        private void checkMandatory​(java.util.List<AttributeInfo> attributes,
                                    int start)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • checkMandatory

        private void checkMandatory​(java.util.List<AttributeInfo> attributes,
                                    java.lang.String padding)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • emptyArray

        void emptyArray​(StructInfo si,
                        java.lang.String className)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • fromArray

        void fromArray​(StructInfo si,
                       java.lang.String className)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • returnInstance

        private void returnInstance​(java.lang.String alignment,
                                    StructInfo info,
                                    java.lang.String className)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • writeArray

        private void writeArray​(java.lang.String className,
                                java.util.List<AttributeInfo> sortedAttributes)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeProperty

        private void writeProperty​(AttributeInfo attr,
                                   boolean checkedDefault,
                                   java.lang.String alignment)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • handleSwitch

        private void handleSwitch​(StructInfo si,
                                  java.lang.String alignment,
                                  boolean useInstance)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • processPropertyValue

        private void processPropertyValue​(AttributeInfo attr,
                                          java.lang.String alignment,
                                          boolean useInstance,
                                          java.util.Map<java.lang.String,​javax.lang.model.type.TypeMirror> genericSignatures)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • calcWeakHash

        private static int calcWeakHash​(java.lang.String name)