Class TypeAnnotationsWriter

    • Constructor Detail

      • TypeAnnotationsWriter

        public TypeAnnotationsWriter​(java.io.OutputStream os,
                                     ConstPool cp)
        Constructs with the given output stream.
        Parameters:
        os - the output stream.
        cp - the constant pool.
    • Method Detail

      • numAnnotations

        public void numAnnotations​(int num)
                            throws java.io.IOException
        Writes num_annotations in Runtime(In)VisibleTypeAnnotations_attribute. It must be followed by num instances of type_annotation.
        Overrides:
        numAnnotations in class AnnotationsWriter
        Throws:
        java.io.IOException
      • typeParameterTarget

        public void typeParameterTarget​(int targetType,
                                        int typeParameterIndex)
                                 throws java.io.IOException
        Writes target_type and type_parameter_target of target_info union.
        Throws:
        java.io.IOException
      • supertypeTarget

        public void supertypeTarget​(int supertypeIndex)
                             throws java.io.IOException
        Writes target_type and supertype_target of target_info union.
        Throws:
        java.io.IOException
      • typeParameterBoundTarget

        public void typeParameterBoundTarget​(int targetType,
                                             int typeParameterIndex,
                                             int boundIndex)
                                      throws java.io.IOException
        Writes target_type and type_parameter_bound_target of target_info union.
        Throws:
        java.io.IOException
      • emptyTarget

        public void emptyTarget​(int targetType)
                         throws java.io.IOException
        Writes target_type and empty_target of target_info union.
        Throws:
        java.io.IOException
      • formalParameterTarget

        public void formalParameterTarget​(int formalParameterIndex)
                                   throws java.io.IOException
        Writes target_type and type_parameter_target of target_info union.
        Throws:
        java.io.IOException
      • throwsTarget

        public void throwsTarget​(int throwsTypeIndex)
                          throws java.io.IOException
        Writes target_type and throws_target of target_info union.
        Throws:
        java.io.IOException
      • localVarTarget

        public void localVarTarget​(int targetType,
                                   int tableLength)
                            throws java.io.IOException
        Writes target_type and localvar_target of target_info union. It must be followed by tableLength calls to localVarTargetTable.
        Throws:
        java.io.IOException
      • localVarTargetTable

        public void localVarTargetTable​(int startPc,
                                        int length,
                                        int index)
                                 throws java.io.IOException
        Writes an element of table[] of localvar_target of target_info union.
        Throws:
        java.io.IOException
      • catchTarget

        public void catchTarget​(int exceptionTableIndex)
                         throws java.io.IOException
        Writes target_type and catch_target of target_info union.
        Throws:
        java.io.IOException
      • offsetTarget

        public void offsetTarget​(int targetType,
                                 int offset)
                          throws java.io.IOException
        Writes target_type and offset_target of target_info union.
        Throws:
        java.io.IOException
      • typeArgumentTarget

        public void typeArgumentTarget​(int targetType,
                                       int offset,
                                       int type_argument_index)
                                throws java.io.IOException
        Writes target_type and type_argument_target of target_info union.
        Throws:
        java.io.IOException
      • typePath

        public void typePath​(int pathLength)
                      throws java.io.IOException
        Writes path_length of type_path.
        Throws:
        java.io.IOException
      • typePathPath

        public void typePathPath​(int typePathKind,
                                 int typeArgumentIndex)
                          throws java.io.IOException
        Writes an element of path[] of type_path.
        Throws:
        java.io.IOException