emma

SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    
    _NARROW_SIZE['�'] = 2;
    
    _NARROW_SIZE['�'] = -1;
    _NARROW_SIZE['�'] = 0;
    
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    
    _NARROW_SIZE['�'] = 5;
    
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 3;
    
    _NARROW_SIZE['�'] = 2;
    _NARROW_SIZE['�'] = 3;
    _NARROW_SIZE['�'] = 4;
    
    _NARROW_SIZE['�'] = 5;
    _NARROW_SIZE['�'] = 5;
    
    _WIDE_SIZE = (int[])_NARROW_SIZE.clone();
    
    _WIDE_SIZE[21] = 3;
    _WIDE_SIZE[22] = 3;
    _WIDE_SIZE[23] = 3;
    _WIDE_SIZE[24] = 3;
    _WIDE_SIZE[25] = 3;
    _WIDE_SIZE[54] = 3;
    _WIDE_SIZE[55] = 3;
    _WIDE_SIZE[56] = 3;
    _WIDE_SIZE[57] = 3;
    _WIDE_SIZE[58] = 3;
    
    _WIDE_SIZE['?'] = 5;
    
    _WIDE_SIZE['�'] = 3;
  }
}

/* Location:
 * Qualified Name:     com.vladium.jcd.opcodes.IOpcodes.clinit
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.jcd.opcodes;

public abstract interface IOpcodes
{
  public static final int _nop = 0;
  public static final int _aconst_null = 1;
  public static final int _iconst_m1 = 2;
  public static final int _iconst_0 = 3;
  public static final int _iconst_1 = 4;
  public static final int _iconst_2 = 5;
  public static final int _iconst_3 = 6;
  public static final int _iconst_4 = 7;
  public static final int _iconst_5 = 8;
  public static final int _lconst_0 = 9;
  public static final int _lconst_1 = 10;
  public static final int _fconst_0 = 11;
  public static final int _fconst_1 = 12;
  public static final int _fconst_2 = 13;
  public static final int _dconst_0 = 14;
  public static final int _dconst_1 = 15;
  public static final int _bipush = 16;
  public static final int _sipush = 17;
  public static final int _ldc = 18;
  public static final int _ldc_w = 19;
  public static final int _ldc2_w = 20;
  public static final int _iload = 21;
  public static final int _lload = 22;
  public static final int _fload = 23;
  public static final int _dload = 24;
  public static final int _aload = 25;
  public static final int _iload_0 = 26;
  public static final int _iload_1 = 27;
  public static final int _iload_2 = 28;
  public static final int _iload_3 = 29;
  public static final int _lload_0 = 30;
  public static final int _lload_1 = 31;
  public static final int _lload_2 = 32;
  public static final int _lload_3 = 33;
  public static final int _fload_0 = 34;
  public static final int _fload_1 = 35;
  public static final int _fload_2 = 36;
  public static final int _fload_3 = 37;
  public static final int _dload_0 = 38;
  public static final int _dload_1 = 39;
  public static final int _dload_2 = 40;
  public static final int _dload_3 = 41;
  public static final int _aload_0 = 42;
  public static final int _aload_1 = 43;
  public static final int _aload_2 = 44;
  public static final int _aload_3 = 45;
  public static final int _iaload = 46;
  public static final int _laload = 47;
  public static final int _faload = 48;
  public static final int _daload = 49;
  public static final int _aaload = 50;
  public static final int _baload = 51;
  public static final int _caload = 52;
  public static final int _saload = 53;
  public static final int _istore = 54;
  public static final int _lstore = 55;
  public static final int _fstore = 56;
  public static final int _dstore = 57;
  public static final int _astore = 58;
  public static final int _istore_0 = 59;
  public static final int _istore_1 = 60;
  public static final int _istore_2 = 61;
  public static final int _istore_3 = 62;
  public static final int _lstore_0 = 63;
  public static final int _lstore_1 = 64;
  public static final int _lstore_2 = 65;
  public static final int _lstore_3 = 66;
  public static final int _fstore_0 = 67;
  public static final int _fstore_1 = 68;
  public static final int _fstore_2 = 69;
  public static final int _fstore_3 = 70;
  public static final int _dstore_0 = 71;
  public static final int _dstore_1 = 72;
  public static final int _dstore_2 = 73;
  public static final int _dstore_3 = 74;
  public static final int _astore_0 = 75;
  public static final int _astore_1 = 76;
  public static final int _astore_2 = 77;
  public static final int _astore_3 = 78;
  public static final int _iastore = 79;
  public static final int _lastore = 80;
  public static final int _fastore = 81;
  public static final int _dastore = 82;
  public static final int _aastore = 83;
  public static final int _bastore = 84;
  public static final int _castore = 85;
  public static final int _sastore = 86;
  public static final int _pop = 87;
  public static final int _pop2 = 88;
  public static final int _dup = 89;
  public static final int _dup_x1 = 90;
  public static final int _dup_x2 = 91;
  public static final int _dup2 = 92;
  public static final int _dup2_x1 = 93;
  public static final int _dup2_x2 = 94;
  public static final int _swap = 95;
  public static final int _iadd = 96;
  public static final int _ladd = 97;
  public static final int _fadd = 98;
  public static final int _dadd = 99;
  public static final int _isub = 100;
  public static final int _lsub = 101;
  public static final int _fsub = 102;
  public static final int _dsub = 103;
  public static final int _imul = 104;
  public static final int _lmul = 105;
  public static final int _fmul = 106;
  public static final int _dmul = 107;
  public static final int _idiv = 108;
  public static final int _ldiv = 109;
  public static final int _fdiv = 110;
  public static final int _ddiv = 111;
  public static final int _irem = 112;
  public static final int _lrem = 113;
  public static final int _frem = 114;
  public static final int _drem = 115;
  public static final int _ineg = 116;
  public static final int _lneg = 117;
  public static final int _fneg = 118;
  public static final int _dneg = 119;
  public static final int _ishl = 120;
  public static final int _lshl = 121;
  public static final int _ishr = 122;
  public static final int _lshr = 123;
  public static final int _iushr = 124;
  public static final int _lushr = 125;
  public static final int _iand = 126;
  public static final int _land = 127;
  public static final int _ior = 128;
  public static final int _lor = 129;
  public static final int _ixor = 130;
  public static final int _lxor = 131;
  public static final int _iinc = 132;
  public static final int _i2l = 133;
  public static final int _i2f = 134;
  public static final int _i2d = 135;
  public static final int _l2i = 136;
  public static final int _l2f = 137;
  public static final int _l2d = 138;
  public static final int _f2i = 139;
  public static final int _f2l = 140;
  public static final int _f2d = 141;
  public static final int _d2i = 142;
  public static final int _d2l = 143;
  public static final int _d2f = 144;
  public static final int _i2b = 145;
  public static final int _i2c = 146;
  public static final int _i2s = 147;
  public static final int _lcmp = 148;
  public static final int _fcmpl = 149;
  public static final int _fcmpg = 150;
  public static final int _dcmpl = 151;
  public static final int _dcmpg = 152;
  public static final int _ifeq = 153;
  public static final int _ifne = 154;
  public static final int _iflt = 155;
  public static final int _ifge = 156;
  public static final int _ifgt = 157;
  public static final int _ifle = 158;
  public static final int _if_icmpeq = 159;
  public static final int _if_icmpne = 160;
  public static final int _if_icmplt = 161;
  public static final int _if_icmpge = 162;
  public static final int _if_icmpgt = 163;
  public static final int _if_icmple = 164;
  public static final int _if_acmpeq = 165;
  public static final int _if_acmpne = 166;
  public static final int _goto = 167;
  public static final int _jsr = 168;
  public static final int _ret = 169;
  public static final int _tableswitch = 170;
  public static final int _lookupswitch = 171;
  public static final int _ireturn = 172;
  public static final int _lreturn = 173;
  public static final int _freturn = 174;
  public static final int _dreturn = 175;
  public static final int _areturn = 176;
  public static final int _return = 177;
  public static final int _getstatic = 178;
  public static final int _putstatic = 179;
  public static final int _getfield = 180;
  public static final int _putfield = 181;
  public static final int _invokevirtual = 182;
  public static final int _invokespecial = 183;
  public static final int _invokestatic = 184;
  public static final int _invokeinterface = 185;
  public static final int _unused = 186;
  public static final int _new = 187;
  public static final int _newarray = 188;
  public static final int _anewarray = 189;
  public static final int _arraylength = 190;
  public static final int _athrow = 191;
  public static final int _checkcast = 192;
  public static final int _instanceof = 193;
  public static final int _monitorenter = 194;
  public static final int _monitorexit = 195;
  public static final int _wide = 196;
  public static final int _multianewarray = 197;
  public static final int _ifnull = 198;
  public static final int _ifnonnull = 199;
  public static final int _goto_w = 200;
  public static final int _jsr_w = 201;
  public static final int _breakpoint = 202;
  public static final int _impdep1 = 254;
  public static final int _impdep2 = 255;
  public static final String[] MNEMONICS = { "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1", "iconst_2", "iconst_3", "iconst_4", "iconst_5", "lconst_0", "lconst_1", "fconst_0", "fconst_1", "fconst_2", "dconst_0", "dconst_1", "bipush", "sipush", "ldc", "ldc_w", "ldc2_w", "iload", "lload", "fload", "dload", "aload", "iload_0", "iload_1", "iload_2", "iload_3", "lload_0", "lload_1", "lload_2", "lload_3", "fload_0", "fload_1", "fload_2", "fload_3", "dload_0", "dload_1", "dload_2", "dload_3", "aload_0", "aload_1", "aload_2", "aload_3", "iaload", "laload", "faload", "daload", "aaload", "baload", "caload", "saload", "istore", "lstore", "fstore", "dstore", "astore", "istore_0", "istore_1", "istore_2", "istore_3", "lstore_0", "lstore_1", "lstore_2", "lstore_3", "fstore_0", "fstore_1", "fstore_2", "fstore_3", "dstore_0", "dstore_1", "dstore_2", "dstore_3", "astore_0", "astore_1", "astore_2", "astore_3", "iastore", "lastore", "fastore", "dastore", "aastore", "bastore", "castore", "sastore", "pop", "pop2", "dup", "dup_x1", "dup_x2", "dup2", "dup2_x1", "dup2_x2", "swap", "iadd", "ladd", "fadd", "dadd", "isub", "lsub", "fsub", "dsub", "imul", "lmul", "fmul", "dmul", "idiv", "ldiv", "fdiv", "ddiv", "irem", "lrem", "frem", "drem", "ineg", "lneg", "fneg", "dneg", "ishl", "lshl", "ishr", "lshr", "iushr", "lushr", "iand", "land", "ior", "lor", "ixor", "lxor", "iinc", "i2l", "i2f", "i2d", "l2i", "l2f", "l2d", "f2i", "f2l", "f2d", "d2i", "d2l", "d2f", "i2b", "i2c", "i2s", "lcmp", "fcmpl", "fcmpg", "dcmpl", "dcmpg", "ifeq", "ifne", "iflt", "ifge", "ifgt", "ifle", "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpge", "if_icmpgt", "if_icmple", "if_acmpeq", "if_acmpne", "goto", "jsr", "ret", "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn", "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield", "putfield", "invokevirtual", "invokespecial", "invokestatic", "invokeinterface", "unused", "new", "newarray", "anewarray", "arraylength", "athrow", "checkcast", "instanceof", "monitorenter", "monitorexit", "[wide]", "multianewarray", "ifnull", "ifnonnull", "goto_w", "jsr_w" };
  public static final boolean[] CONDITIONAL_BRANCHES = clinit._CONDITIONAL_BRANCHES;
  public static final boolean[] COMPOUND_CONDITIONAL_BRANCHES = clinit._COMPOUND_CONDITIONAL_BRANCHES;
  public static final boolean[] UNCONDITIONAL_BRANCHES = clinit._UNCONDITIONAL_BRANCHES;
  public static final boolean[] BRANCHES = clinit._BRANCHES;
  public static final int[] NARROW_SIZE = clinit._NARROW_SIZE;
  public static final int[] WIDE_SIZE = clinit._WIDE_SIZE;
  
  public static final class clinit
  {
    static final boolean[] _CONDITIONAL_BRANCHES;
    static final boolean[] _COMPOUND_CONDITIONAL_BRANCHES;
    static final boolean[] _UNCONDITIONAL_BRANCHES;
    static final boolean[] _BRANCHES;
    static final int[] _NARROW_SIZE;
    static final int[] _WIDE_SIZE;
    
    static
    {
      int opcodeCount = IOpcodes.MNEMONICS.length;
      
      _CONDITIONAL_BRANCHES = new boolean[opcodeCount];
      
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['?'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      _CONDITIONAL_BRANCHES['�'] = true;
      
      _COMPOUND_CONDITIONAL_BRANCHES = new boolean[opcodeCount];
      
      _COMPOUND_CONDITIONAL_BRANCHES['�'] = true;
      _COMPOUND_CONDITIONAL_BRANCHES['�'] = true;
      
      _UNCONDITIONAL_BRANCHES = new boolean[opcodeCount];
      
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      _UNCONDITIONAL_BRANCHES['�'] = true;
      
      _UNCONDITIONAL_BRANCHES['�'] = true;
      
      _BRANCHES = new boolean[opcodeCount];
      for (int o = 0; o < opcodeCount; o++) {
        if (_CONDITIONAL_BRANCHES[o] != 0) {
          _BRANCHES[o] = true;
        }
      }
      for (int o = 0; o < opcodeCount; o++) {
        if (_COMPOUND_CONDITIONAL_BRANCHES[o] != 0) {
          _BRANCHES[o] = true;
        }
      }
      for (int o = 0; o < opcodeCount; o++) {
        if (_UNCONDITIONAL_BRANCHES[o] != 0) {
          _BRANCHES[o] = true;
        }
      }
      _NARROW_SIZE = new int[opcodeCount];
      for (int o = 0; o < opcodeCount; o++) {
        _NARROW_SIZE[o] = 1;
      }
      _NARROW_SIZE[16] = 2;
      _NARROW_SIZE[17] = 3;
      
      _NARROW_SIZE[18] = 2;
      _NARROW_SIZE[19] = 3;
      _NARROW_SIZE[20] = 3;
      
      _NARROW_SIZE[21] = 2;
      _NARROW_SIZE[22] = 2;
      _NARROW_SIZE[23] = 2;
      _NARROW_SIZE[24] = 2;
      _NARROW_SIZE[25] = 2;
      _NARROW_SIZE[54] = 2;
      _NARROW_SIZE[55] = 2;
      _NARROW_SIZE[56] = 2;
      _NARROW_SIZE[57] = 2;
      _NARROW_SIZE[58] = 2;
      
      _NARROW_SIZE['?'] = 3;
      
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['?'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      
      _NARROW_SIZE['�'] = 2;
      
      _NARROW_SIZE['�'] = -1;
      _NARROW_SIZE['�'] = 0;
      
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      
      _NARROW_SIZE['�'] = 5;
      
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 3;
      
      _NARROW_SIZE['�'] = 2;
      _NARROW_SIZE['�'] = 3;
      _NARROW_SIZE['�'] = 4;
      
      _NARROW_SIZE['�'] = 5;
      _NARROW_SIZE['�'] = 5;
      
      _WIDE_SIZE = (int[])_NARROW_SIZE.clone();
      
      _WIDE_SIZE[21] = 3;
      _WIDE_SIZE[22] = 3;
      _WIDE_SIZE[23] = 3;
      _WIDE_SIZE[24] = 3;
      _WIDE_SIZE[25] = 3;
      _WIDE_SIZE[54] = 3;
      _WIDE_SIZE[55] = 3;
      _WIDE_SIZE[56] = 3;
      _WIDE_SIZE[57] = 3;
      _WIDE_SIZE[58] = 3;
      
      _WIDE_SIZE['?'] = 5;
      
      _WIDE_SIZE['�'] = 3;
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.jcd.opcodes.IOpcodes
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.jcd.parser;

import com.vladium.jcd.cls.ClassDef;
import com.vladium.jcd.cls.Field_info;
import com.vladium.jcd.cls.IAttributeCollection;
import com.vladium.jcd.cls.IConstantCollection;
import com.vladium.jcd.cls.IFieldCollection;
import com.vladium.jcd.cls.IInterfaceCollection;
import com.vladium.jcd.cls.IMethodCollection;
import com.vladium.jcd.cls.Method_info;
import com.vladium.jcd.cls.attribute.Attribute_info;
import com.vladium.jcd.cls.attribute.ConstantValueAttribute_info;
import com.vladium.jcd.cls.constant.CONSTANT_Double_info;
import com.vladium.jcd.cls.constant.CONSTANT_Long_info;
import com.vladium.jcd.cls.constant.CONSTANT_info;
import com.vladium.jcd.cls.constant.CONSTANT_literal_info;
import com.vladium.jcd.lib.UDataInputStream;
import java.io.IOException;

final class ClassDefParser$classParser
{
  private final UDataInputStream m_bytes;
  private ClassDef m_table;
  private static final boolean DEBUG = false;
  private static final String s_line = "------------------------------------------------------------------------";
  
  ClassDefParser$classParser(UDataInputStream bytes)
  {
    m_bytes = bytes;
  }
  
  ClassDef class_table()
    throws IOException
  {
    m_table = new ClassDef();
    
    magic();
    version();
    
    constant_pool();
    
    access_flags();
    this_class();
    super_class();
    
    interfaces();
    
    fields();
    
    methods();
    
    attributes();
    
    return m_table;
  }
  
  void magic()
    throws IOException
  {
    long magic = m_bytes.readU4();
    
    m_table.setMagic(magic);
  }
  
  void version()
    throws IOException
  {
    int minor_version = m_bytes.readU2();
    int major_version = m_bytes.readU2();
    
    m_table.setVersion(new int[] { major_version, minor_version });
  }
  
  void constant_pool()
    throws IOException
  {
    int constant_pool_count = m_bytes.readU2();
    
    IConstantCollection constants = m_table.getConstants();
    for (int index = 1; index < constant_pool_count; index++)
    {
      CONSTANT_info cp_info = CONSTANT_info.new_CONSTANT_info(m_bytes);
      constants.add(cp_info);
      if (((cp_info instanceof CONSTANT_Long_info)) || ((cp_info instanceof CONSTANT_Double_info))) {
        index++;
      }
    }
  }
  
  void access_flags()
    throws IOException
  {
    int _access_flags = m_bytes.readU2();
    
    m_table.setAccessFlags(_access_flags);
  }
  
  void this_class()
    throws IOException
  {
    int _class_index = m_bytes.readU2();
    
    m_table.setThisClassIndex(_class_index);
  }
  
  void super_class()
    throws IOException
  {
    int _class_index = m_bytes.readU2();
    
    m_table.setSuperClassIndex(_class_index);
  }
  
  void interfaces()
    throws IOException
  {
    int _interfaces_count = m_bytes.readU2();
    for (int i = 0; i < _interfaces_count; i++)
    {
      int _interface_index = m_bytes.readU2();
      
      m_table.getInterfaces().add(_interface_index);
    }
  }
  
  void fields()
    throws IOException
  {
    int _fields_count = m_bytes.readU2();
    
    IConstantCollection constantPool = m_table.getConstants();
    for (int i = 0; i < _fields_count; i++)
    {
      Field_info field_info = new Field_info(constantPool, m_bytes);
      
      m_table.getFields().add(field_info);
      if (((field_info.getAccessFlags() & 0x18) == 24) && ("serialVersionUID".equals(field_info.getName(m_table))))
      {
        IAttributeCollection attributes = field_info.getAttributes();
        int a = 0;
        for (int aLimit = attributes.size(); a < aLimit; a++)
        {
          Attribute_info attr_info = attributes.get(a);
          if ((attr_info instanceof ConstantValueAttribute_info))
          {
            CONSTANT_literal_info constant_value = ((ConstantValueAttribute_info)attr_info).getValue(m_table);
            if ((constant_value instanceof CONSTANT_Long_info)) {
              m_table.setDeclaredSUID(m_value);
            }
          }
        }
      }
    }
  }
  
  void methods()
    throws IOException
  {
    int _methods_count = m_bytes.readU2();
    
    IConstantCollection constantPool = m_table.getConstants();
    for (int i = 0; i < _methods_count; i++)
    {
      Method_info method_info = new Method_info(constantPool, m_bytes);
      
      m_table.getMethods().add(method_info);
    }
  }
  
  void attributes()
    throws IOException
  {
    int _attributes_count = m_bytes.readU2();
    
    IConstantCollection constantPool = m_table.getConstants();
    for (int i = 0; i < _attributes_count; i++)
    {
      Attribute_info attribute_info = Attribute_info.new_Attribute_info(constantPool, m_bytes);
      
      m_table.getAttributes().add(attribute_info);
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.jcd.parser.ClassDefParser.classParser
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.jcd.parser;

import com.vladium.jcd.cls.ClassDef;
import com.vladium.jcd.cls.Field_info;
import com.vladium.jcd.cls.IAttributeCollection;
import com.vladium.jcd.cls.IConstantCollection;
import com.vladium.jcd.cls.IFieldCollection;
import com.vladium.jcd.cls.IInterfaceCollection;
import com.vladium.jcd.cls.IMethodCollection;
import com.vladium.jcd.cls.Method_info;
import com.vladium.jcd.cls.attribute.Attribute_info;
import com.vladium.jcd.cls.attribute.ConstantValueAttribute_info;
import com.vladium.jcd.cls.constant.CONSTANT_Double_info;
import com.vladium.jcd.cls.constant.CONSTANT_Long_info;
import com.vladium.jcd.cls.constant.CONSTANT_info;
import com.vladium.jcd.cls.constant.CONSTANT_literal_info;
import com.vladium.jcd.lib.UDataInputStream;
import com.vladium.util.ByteArrayIStream;
import java.io.IOException;
import java.io.InputStream;

public abstract class ClassDefParser
{
  static final boolean PARSE_SERIAL_VERSION_UID = true;
  static final String SERIAL_VERSION_UID_FIELD_NAME = "serialVersionUID";
  static final int SERIAL_VERSION_UID_FIELD_MASK = 24;
  
  public static ClassDef parseClass(byte[] bytes)
    throws IOException
  {
    if (bytes == null) {
      throw new IllegalArgumentException("null input: bytes");
    }
    classParser parser = new classParser(new UDataInputStream(new ByteArrayIStream(bytes)));
    
    return parser.class_table();
  }
  
  public static ClassDef parseClass(byte[] bytes, int length)
    throws IOException
  {
    if (bytes == null) {
      throw new IllegalArgumentException("null input: bytes");
    }
    classParser parser = new classParser(new UDataInputStream(new ByteArrayIStream(bytes, length)));
    
    return parser.class_table();
  }
  
  public static ClassDef parseClass(InputStream bytes)
    throws IOException
  {
    if (bytes == null) {
      throw new IllegalArgumentException("null input: bytes");
    }
    classParser parser = new classParser(new UDataInputStream(bytes));
    
    return parser.class_table();
  }
  
  private static final class classParser
  {
    private final UDataInputStream m_bytes;
    private ClassDef m_table;
    private static final boolean DEBUG = false;
    private static final String s_line = "------------------------------------------------------------------------";
    
    classParser(UDataInputStream bytes)
    {
      m_bytes = bytes;
    }
    
    ClassDef class_table()
      throws IOException
    {
      m_table = new ClassDef();
      
      magic();
      version();
      
      constant_pool();
      
      access_flags();
      this_class();
      super_class();
      
      interfaces();
      
      fields();
      
      methods();
      
      attributes();
      
      return m_table;
    }
    
    void magic()
      throws IOException
    {
      long magic = m_bytes.readU4();
      
      m_table.setMagic(magic);
    }
    
    void version()
      throws IOException
    {
      int minor_version = m_bytes.readU2();
      int major_version = m_bytes.readU2();
      
      m_table.setVersion(new int[] { major_version, minor_version });
    }
    
    void constant_pool()
      throws IOException
    {
      int constant_pool_count = m_bytes.readU2();
      
      IConstantCollection constants = m_table.getConstants();
      for (int index = 1; index < constant_pool_count; index++)
      {
        CONSTANT_info cp_info = CONSTANT_info.new_CONSTANT_info(m_bytes);
        constants.add(cp_info);
        if (((cp_info instanceof CONSTANT_Long_info)) || ((cp_info instanceof CONSTANT_Double_info))) {
          index++;
        }
      }
    }
    
    void access_flags()
      throws IOException
    {
      int _access_flags = m_bytes.readU2();
      
      m_table.setAccessFlags(_access_flags);
    }
    
    void this_class()
      throws IOException
    {
      int _class_index = m_bytes.readU2();
      
      m_table.setThisClassIndex(_class_index);
    }
    
    void super_class()
      throws IOException
    {
      int _class_index = m_bytes.readU2();
      
      m_table.setSuperClassIndex(_class_index);
    }
    
    void interfaces()
      throws IOException
    {
      int _interfaces_count = m_bytes.readU2();
      for (int i = 0; i < _interfaces_count; i++)
      {
        int _interface_index = m_bytes.readU2();
        
        m_table.getInterfaces().add(_interface_index);
      }
    }
    
    void fields()
      throws IOException
    {
      int _fields_count = m_bytes.readU2();
      
      IConstantCollection constantPool = m_table.getConstants();
      for (int i = 0; i < _fields_count; i++)
      {
        Field_info field_info = new Field_info(constantPool, m_bytes);
        
        m_table.getFields().add(field_info);
        if (((field_info.getAccessFlags() & 0x18) == 24) && ("serialVersionUID".equals(field_info.getName(m_table))))
        {
          IAttributeCollection attributes = field_info.getAttributes();
          int a = 0;
          for (int aLimit = attributes.size(); a < aLimit; a++)
          {
            Attribute_info attr_info = attributes.get(a);
            if ((attr_info instanceof ConstantValueAttribute_info))
            {
              CONSTANT_literal_info constant_value = ((ConstantValueAttribute_info)attr_info).getValue(m_table);
              if ((constant_value instanceof CONSTANT_Long_info)) {
                m_table.setDeclaredSUID(m_value);
              }
            }
          }
        }
      }
    }
    
    void methods()
      throws IOException
    {
      int _methods_count = m_bytes.readU2();
      
      IConstantCollection constantPool = m_table.getConstants();
      for (int i = 0; i < _methods_count; i++)
      {
        Method_info method_info = new Method_info(constantPool, m_bytes);
        
        m_table.getMethods().add(method_info);
      }
    }
    
    void attributes()
      throws IOException
    {
      int _attributes_count = m_bytes.readU2();
      
      IConstantCollection constantPool = m_table.getConstants();
      for (int i = 0; i < _attributes_count; i++)
      {
        Attribute_info attribute_info = Attribute_info.new_Attribute_info(constantPool, m_bytes);
        
        m_table.getAttributes().add(attribute_info);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.vladium.jcd.parser.ClassDefParser
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.logging;

public abstract interface ILogLevels
{
  public static final int SEVERE = 0;
  public static final int WARNING = 1;
  public static final int INFO = 2;
  public static final int VERBOSE = 3;
  public static final int TRACE1 = 4;
  public static final int TRACE2 = 5;
  public static final int TRACE3 = 6;
  public static final int NONE = -1;
  public static final int ALL = 7;
  public static final String SEVERE_STRING = "severe";
  public static final String SILENT_STRING = "silent";
  public static final String WARNING_STRING = "warning";
  public static final String QUIET_STRING = "quiet";
  public static final String INFO_STRING = "info";
  public static final String VERBOSE_STRING = "verbose";
  public static final String TRACE1_STRING = "trace1";
  public static final String TRACE2_STRING = "trace2";
  public static final String TRACE3_STRING = "trace3";
  public static final String NONE_STRING = "none";
  public static final String ALL_STRING = "all";
}

/* Location:
 * Qualified Name:     com.vladium.logging.ILogLevels
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.logging;

class Logger$1 {}

/* Location:
 * Qualified Name:     com.vladium.logging.Logger.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.logging;

import java.util.LinkedList;

final class Logger$ThreadLocalStack
  extends InheritableThreadLocal
{
  Logger$ThreadLocalStack(Logger.1 x0)
  {
    this();
  }
  
  protected Object initialValue()
  {
    return new LinkedList();
  }
  
  private Logger$ThreadLocalStack() {}
}

/* Location:
 * Qualified Name:     com.vladium.logging.Logger.ThreadLocalStack
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.logging;

import com.vladium.util.ClassLoaderResolver;
import com.vladium.util.Property;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.NoSuchElementException;
import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;

public final class Logger
  implements ILogLevels
{
  private final int m_level;
  private final PrintWriter m_out;
  private final String m_prefix;
  private final Set m_classMask;
  private static final String PREFIX_TO_STRIP = "com.vladium.";
  
  public static Logger create(int level, PrintWriter out, String prefix, Set classMask)
  {
    if ((level < -1) || (level > 7)) {
      throw new IllegalArgumentException("invalid log level: " + level);
    }
    if ((out == null) || (out.checkError())) {
      throw new IllegalArgumentException("null or corrupt input: out");
    }
    return new Logger(level, out, prefix, classMask);
  }
  
  public static Logger create(int level, PrintWriter out, String prefix, Set classMask, Logger base)
  {
    if (base == null) {
      return create(level, out, prefix, classMask);
    }
    int _level = level >= -1 ? level : m_level;
    
    PrintWriter _out = (out != null) && (!out.checkError()) ? out : m_out;
    
    String _prefix = prefix;
    
    Set _classMask = classMask != null ? classMask : m_classMask;
    
    return new Logger(_level, _out, _prefix, _classMask);
  }
  
  public final boolean isLoggable(int level)
  {
    return level <= m_level;
  }
  
  public final boolean atINFO()
  {
    return 2 <= m_level;
  }
  
  public final boolean atVERBOSE()
  {
    return 3 <= m_level;
  }
  
  public final boolean atTRACE1()
  {
    return 4 <= m_level;
  }
  
  public final boolean atTRACE2()
  {
    return 5 <= m_level;
  }
  
  public final boolean atTRACE3()
  {
    return 6 <= m_level;
  }
  
  public final void warning(String msg)
  {
    _log(1, null, msg, false);
  }
  
  public final void info(String msg)
  {
    _log(2, null, msg, false);
  }
  
  public final void verbose(String msg)
  {
    _log(3, null, msg, false);
  }
  
  public final void trace1(String method, String msg)
  {
    _log(4, method, msg, true);
  }
  
  public final void trace2(String method, String msg)
  {
    _log(5, method, msg, true);
  }
  
  public final void trace3(String method, String msg)
  {
    _log(6, method, msg, true);
  }
  
  public final void log(int level, String msg, boolean logCaller)
  {
    _log(level, null, msg, logCaller);
  }
  
  public final void log(int level, String method, String msg, boolean logCaller)
  {
    _log(level, method, msg, logCaller);
  }
  
  public final void log(int level, String msg, Throwable throwable)
  {
    _log(level, null, msg, throwable);
  }
  
  public final void log(int level, String method, String msg, Throwable throwable)
  {
    _log(level, method, msg, throwable);
  }
  
  public PrintWriter getWriter()
  {
    return m_out;
  }
  
  public static Logger getLogger()
  {
    LinkedList stack = (LinkedList)THREAD_LOCAL_STACK.get();
    if (stack.isEmpty()) {
      return STATIC_LOGGER;
    }
    return (Logger)stack.getLast();
  }
  
  public static void push(Logger ctx)
  {
    if (ctx == null) {
      throw new IllegalArgumentException("null input: ctx");
    }
    LinkedList stack = (LinkedList)THREAD_LOCAL_STACK.get();
    stack.addLast(ctx);
  }
  
  public static void pop(Logger ctx)
  {
    LinkedList stack = (LinkedList)THREAD_LOCAL_STACK.get();
    try
    {
      Logger current = (Logger)stack.getLast();
      if (current != ctx) {
        throw new IllegalStateException("invalid context being popped: " + ctx);
      }
      stack.removeLast();
      current.cleanup();
    }
    catch (NoSuchElementException nsee)
    {
      throw new IllegalStateException("empty logger context stack on thread [" + Thread.currentThread() + "]: " + nsee);
    }
  }
  
  public static int stringToLevel(String level)
  {
    if (("severe".equalsIgnoreCase(level)) || ("silent".equalsIgnoreCase(level))) {
      return 0;
    }
    if (("warning".equalsIgnoreCase(level)) || ("quiet".equalsIgnoreCase(level))) {
      return 1;
    }
    if ("info".equalsIgnoreCase(level)) {
      return 2;
    }
    if ("verbose".equalsIgnoreCase(level)) {
      return 3;
    }
    if ("trace1".equalsIgnoreCase(level)) {
      return 4;
    }
    if ("trace2".equalsIgnoreCase(level)) {
      return 5;
    }
    if ("trace3".equalsIgnoreCase(level)) {
      return 6;
    }
    if ("none".equalsIgnoreCase(level)) {
      return -1;
    }
    if ("all".equalsIgnoreCase(level)) {
      return 7;
    }
    int _level = Integer.MIN_VALUE;
    try
    {
      _level = Integer.parseInt(level);
    }
    catch (Exception ignore) {}
    if ((_level >= -1) && (_level <= 7)) {
      return _level;
    }
    return 2;
  }
  
  private static final class ThreadLocalStack
    extends InheritableThreadLocal
  {
    ThreadLocalStack(Logger.1 x0)
    {
      this();
    }
    
    protected Object initialValue()
    {
      return new LinkedList();
    }
    
    private ThreadLocalStack() {}
  }
  
  private Logger(int level, PrintWriter out, String prefix, Set classMask)
  {
    m_level = level;
    m_out = out;
    m_prefix = prefix;
    m_classMask = classMask;
  }
  
  private void cleanup()
  {
    m_out.flush();
  }
  
  private void _log(int level, String method, String msg, boolean logCaller)
  {
    if ((level <= m_level) && (level >= 0))
    {
      Class caller = logCaller ? ClassLoaderResolver.getCallerClass(2) : null;
      StringBuffer buf = new StringBuffer(m_prefix != null ? m_prefix + ": " : "");
      if ((caller != null) || (method != null))
      {
        buf.append("[");
        if (caller != null)
        {
          String callerName = caller.getName();
          if (callerName.startsWith("com.vladium.")) {
            callerName = callerName.substring(PREFIX_TO_STRIP_LENGTH);
          }
          String parentName = callerName;
          
          int firstDollar = callerName.indexOf('$');
          if (firstDollar > 0) {
            parentName = callerName.substring(0, firstDollar);
          }
          if ((m_classMask == null) || (m_classMask.contains(parentName))) {
            buf.append(callerName);
          } else {
            return;
          }
        }
        if (method != null)
        {
          buf.append("::");
          buf.append(method);
        }
        buf.append("] ");
      }
      PrintWriter out = m_out;
      if (msg != null) {
        buf.append(msg);
      }
      out.println(buf);
      out.flush();
    }
  }
  
  private void _log(int level, String method, String msg, Throwable throwable)
  {
    if ((level <= m_level) && (level >= 0))
    {
      Class caller = ClassLoaderResolver.getCallerClass(2);
      StringBuffer buf = new StringBuffer(m_prefix != null ? m_prefix + ": " : "");
      if ((caller != null) || (method != null))
      {
        buf.append("[");
        if (caller != null)
        {
          String callerName = caller.getName();
          if (callerName.startsWith("com.vladium.")) {
            callerName = callerName.substring(PREFIX_TO_STRIP_LENGTH);
          }
          String parentName = callerName;
          
          int firstDollar = callerName.indexOf('$');
          if (firstDollar > 0) {
            parentName = callerName.substring(0, firstDollar);
          }
          if ((m_classMask == null) || (m_classMask.contains(parentName))) {
            buf.append(callerName);
          } else {
            return;
          }
        }
        if (method != null)
        {
          buf.append("::");
          buf.append(method);
        }
        buf.append("] ");
      }
      PrintWriter out = m_out;
      if (msg != null) {
        buf.append(msg);
      }
      if (throwable != null)
      {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        
        throwable.printStackTrace(pw);
        pw.flush();
        
        buf.append(sw.toString());
      }
      out.println(buf);
      out.flush();
    }
  }
  
  private static final int PREFIX_TO_STRIP_LENGTH = "com.vladium.".length();
  private static final boolean FLUSH_LOG = true;
  private static final String COMMA_DELIMITERS = ", \t\r\n";
  private static final Logger STATIC_LOGGER;
  private static final ThreadLocalStack THREAD_LOCAL_STACK = new ThreadLocalStack(null);
  
  static
  {
    Properties properties = Property.getAppProperties("emma", Logger.class.getClassLoader());
    
    String _level = properties.getProperty("verbosity.level", "info");
    
    int level = stringToLevel(_level);
    
    String _filter = properties.getProperty("verbosity.filter");
    Set temp = null;
    if (_filter != null)
    {
      StringTokenizer tokenizer = new StringTokenizer(_filter, ", \t\r\n");
      if (tokenizer.countTokens() > 0)
      {
        temp = new HashSet(tokenizer.countTokens());
        while (tokenizer.hasMoreTokens()) {
          temp.add(tokenizer.nextToken());
        }
      }
    }
    Set filter = temp;
    
    STATIC_LOGGER = create(level, new PrintWriter(System.out, false), "EMMA", filter);
  }
}

/* Location:
 * Qualified Name:     com.vladium.logging.Logger
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package com.vladium.util;

import java.io.InputStream;

public final class ByteArrayIStream
  extends InputStream
{
  private final byte[] m_buf;
  private final int m_max;
  private int m_pos;
  private static final int NATIVE_COPY_THRESHOLD = 9;
  
  public ByteArrayIStream(byte[] buf)
  {
    this(buf, buf.length);
  }
  
  public ByteArrayIStream(byte[] buf, int length)
  {
    m_buf = buf;
    m_max = length;
  }
  
  public final int read()
  {
    if (m_pos >= m_max) {
      return -1;
    }
    return 0xFF & m_buf[(m_pos++)];
  }
  
  public final int read(byte[] buf, int offset, int length)
  {
    int pos = m_pos;
    int max = m_max;
    if (pos >= max) {
      return -1;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd