package org.sec.dataline.classfile.model.attribute;

/**
 * @author zhou_wei
 * @since v0.1
 */
public class StackMapTableAttribute extends Attribute {

    private short attributeNameIndex;
    private int attributeLength;
    private short numberOfEntries;
    private StackMapFrame[] entries;

    public StackMapTableAttribute() {
        super(50, 0);
    }

    private class StackMapFrame {
        // TODO
    }
}

@@ -373,45 +373,2802 @@
 ate 
-class StackMapFrame %7B%0A        // TODO
+enum StackMapFrame %7B%0A        SAME_FRAME(SameFrame.class),%0A        SAME_LOCALS_1_STACK_ITEM_FRAME(SameLocals1StackItemFrame.class),%0A        SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED(SameLocals1StackItemFrameExtended.class),%0A        CHOP_FRAME(ChopFrame.class),%0A        SAME_FRAME_EXTENDED(SameFrameExtended.class),%0A        APPEND_FRAME(AppendFrame.class),%0A        FULL_FRAME(FullFrame.class);%0A%0A        private Class%3C? extends Frame%3E clazz;%0A%0A        StackMapFrame(Class%3C? extends Frame%3E clazz) %7B%0A            this.clazz = clazz;%0A        %7D%0A%0A        public Frame getInstance() %7B%0A            try %7B%0A                return this.clazz.newInstance();%0A            %7D catch (InstantiationException %7C IllegalAccessException e) %7B%0A                e.printStackTrace();%0A                return null;%0A            %7D%0A        %7D%0A    %7D%0A%0A    private class Frame %7B%0A        protected short frameType;%0A        protected short minFrameType;%0A        protected short maxFrameType;%0A    %7D%0A%0A    private class SameFrame extends Frame %7B%0A        public SameFrame() %7B%0A            this.minFrameType = 0;%0A            this.maxFrameType = 63;%0A        %7D%0A    %7D%0A%0A    private class SameLocals1StackItemFrame extends Frame %7B%0A        // TODO private verification_type_info stack%5B1%5D;%0A        public SameLocals1StackItemFrame() %7B%0A            this.minFrameType = 64;%0A            this.maxFrameType = 127;%0A        %7D%0A    %7D%0A%0A    private class SameLocals1StackItemFrameExtended extends Frame %7B%0A        // TODO verification_type_info stack%5B1%5D;%0A        // TODO u2 offset_delta;%0A        public SameLocals1StackItemFrameExtended() %7B%0A            this.frameType = 247;%0A            this.minFrameType = 247;%0A            this.maxFrameType = 247;%0A        %7D%0A    %7D%0A%0A    private class ChopFrame extends Frame %7B%0A        // TODO u2 offset_delta;%0A        public ChopFrame() %7B%0A            this.minFrameType = 248;%0A            this.maxFrameType = 250;%0A        %7D%0A    %7D%0A%0A    private class SameFrameExtended extends Frame %7B%0A        // u2 offset_delta;%0A        public SameFrameExtended() %7B%0A            this.frameType = 251;%0A            this.minFrameType = 251;%0A            this.maxFrameType = 251;%0A        %7D%0A    %7D%0A%0A    private class AppendFrame extends Frame %7B%0A        //u2 offset_delta;%0A        //verification_type_info locals%5Bframe_type - 251%5D;%0A        public AppendFrame() %7B%0A            this.minFrameType = 252;%0A            this.maxFrameType = 254;%0A        %7D%0A    %7D%0A%0A    private class FullFrame extends Frame %7B%0A//        u2 offset_delta;%0A//        u2 number_of_locals;%0A//        verification_type_info locals%5Bnumber_of_locals%5D;%0A//        u2 number_of_stack_items;%0A//        verification_type_info stack%5Bnumber_of_stack_items%5D;%0A        public FullFrame() %7B%0A            this.frameType = 255;%0A            this.minFrameType = 255;%0A            this.maxFrameType = 255;%0A        %7D
 %0A   

add stack frame classes