1 19 20 package jode.decompiler; 21 import jode.bytecode.ClassInfo; 22 import jode.bytecode.InnerClassInfo; 23 24 public class Options { 25 public static final int TAB_SIZE_MASK = 0x0f; 26 public static final int BRACE_AT_EOL = 0x10; 27 public static final int BRACE_FLUSH_LEFT = 0x20; 28 public static final int GNU_SPACING = 0x40; 29 public static final int SUN_STYLE = 0x14; 30 public static final int GNU_STYLE = 0x42; 31 public static final int PASCAL_STYLE = 0x24; 32 33 public static final int OPTION_LVT = 0x0001; 34 public static final int OPTION_INNER = 0x0002; 35 public static final int OPTION_ANON = 0x0004; 36 public static final int OPTION_PUSH = 0x0008; 37 public static final int OPTION_PRETTY = 0x0010; 38 public static final int OPTION_DECRYPT = 0x0020; 39 public static final int OPTION_ONETIME = 0x0040; 40 public static final int OPTION_IMMEDIATE = 0x0080; 41 public static final int OPTION_VERIFY = 0x0100; 42 public static final int OPTION_CONTRAFO = 0x0200; 43 44 public static int options = 45 OPTION_LVT | OPTION_INNER | OPTION_ANON | OPTION_PRETTY | 46 OPTION_DECRYPT | OPTION_VERIFY | OPTION_CONTRAFO; 47 48 public static int outputStyle = SUN_STYLE; 49 50 public final static boolean doAnonymous() { 51 return (options & OPTION_ANON) != 0; 52 } 53 54 public final static boolean doInner() { 55 return (options & OPTION_INNER) != 0; 56 } 57 58 public static boolean skipClass(ClassInfo clazz) { 59 InnerClassInfo[] outers = clazz.getOuterClasses(); 60 if (outers != null) { 61 if (outers[0].outer == null) { 62 return doAnonymous(); 63 } else { 64 return doInner(); 65 } 66 } 67 return false; 68 } 69 } 70 | Popular Tags |