コード例 #1
0
 public virtual AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, bool visible)
 {
     if (api < Opcodes.ASM5)
     {
         throw new RuntimeException();
     }
     if (mv != null)
     {
         return(mv.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, desc, visible));
     }
     return(null);
 }
コード例 #2
0
 public virtual AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, bool visible)
 {
     if (api < Opcodes.ASM5)
     {
         throw new RuntimeException();
     }
     if (mv != null)
     {
         return(mv.visitTypeAnnotation(typeRef, typePath, desc, visible));
     }
     return(null);
 }
コード例 #3
0
        static internal void putTarget(int typeRef, TypePath typePath, ByteVector @out)
        {
            switch (typeRef /*>>>*/ >> 24)
            {
            case 0x00:
            case 0x01:
            case 0x16:
                @out.putShort(typeRef /*>>>*/ >> 16);
                break;

            case 0x13:
            case 0x14:
            case 0x15:
                @out.putByte(typeRef /*>>>*/ >> 24);
                break;

            case 0x47:
            case 0x48:
            case 0x49:
            case 0x4A:
            case 0x4B:
                @out.putInt(typeRef);
                break;

            default:
                @out.put12(typeRef /*>>>*/ >> 24, (typeRef & 0xFFFF00) >> 8);
                break;
            }
            if (typePath == null)
            {
                @out.putByte(0);
            }
            else
            {
                int length = typePath.b[typePath.offset] * 2 + 1;
                @out.putByteArray(typePath.b, typePath.offset, length);
            }
        }
コード例 #4
0
ファイル: FieldWriter.cs プロジェクト: anatawa12/Ow2AsmForCs
        public override AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, bool visible)
        {
            if (!ClassReader.ANNOTATIONS)
            {
                return(null);
            }
            ByteVector bv = new ByteVector();

            AnnotationWriter.putTarget(typeRef, typePath, bv);
            bv.putShort(cw.newUTF8(desc)).putShort(0);
            AnnotationWriter aw = new AnnotationWriter(cw, true, bv, bv, bv.length - 2);

            if (visible)
            {
                aw.next = tanns;
                tanns   = aw;
            }
            else
            {
                aw.next = itanns;
                itanns  = aw;
            }
            return(aw);
        }