1 19 20 21 package ca.mcgill.sable.soot.editors; 22 23 import java.util.*; 24 25 public class JimpleOutlineObject { 26 27 private Vector children; 28 private String label; 29 private JimpleOutlineObject parent; 30 private int type; 31 private BitSet decorators; 32 33 public static final int NONE = 100; 34 public static final int CLASS = 10; 35 public static final int INTERFACE = 11; 36 public static final int METHOD = 1; 37 public static final int PUBLIC_METHOD = 2; 38 public static final int PRIVATE_METHOD = 3; 39 public static final int PROTECTED_METHOD = 4; 40 public static final int NONE_METHOD = 30; 41 public static final int FIELD = 5; 42 public static final int PUBLIC_FIELD = 6; 43 public static final int PRIVATE_FIELD = 7; 44 public static final int PROTECTED_FIELD = 8; 45 public static final int NONE_FIELD = 31; 46 47 public static final int FINAL_DEC = 20; 48 public static final int STATIC_DEC = 21; 49 public static final int SYNCHRONIZED_DEC = 22; 50 public static final int ABSTRACT_DEC = 23; 51 52 public JimpleOutlineObject(String label, int type, BitSet dec){ 53 setLabel(label); 54 setType(type); 55 setDecorators(dec); 56 } 57 58 public void addChild(JimpleOutlineObject t) { 59 if (getChildren() == null) { 60 setChildren(new Vector()); 61 } 62 t.setParent(this); 63 getChildren().add(t); 64 } 65 66 69 public Vector getChildren() { 70 return children; 71 } 72 73 76 public String getLabel() { 77 return label; 78 } 79 80 83 public JimpleOutlineObject getParent() { 84 return parent; 85 } 86 87 90 public void setChildren(Vector vector) { 91 children = vector; 92 } 93 94 97 public void setLabel(String string) { 98 label = string; 99 } 100 101 104 public void setParent(JimpleOutlineObject object) { 105 parent = object; 106 } 107 108 111 public int getType() { 112 return type; 113 } 114 115 118 public void setType(int i) { 119 type = i; 120 } 121 122 123 124 127 public BitSet getDecorators() { 128 return decorators; 129 } 130 131 134 public void setDecorators(BitSet list) { 135 decorators = list; 136 } 137 138 } 139 | Popular Tags |