1 26 27 package org.objectweb.util.browser.plugin.java.reflect; 28 29 import java.util.Iterator ; 30 import java.util.Vector ; 31 32 40 public class ClassVisibilityConfig 41 extends Vector { 42 43 49 50 public static final String INNER_CLASS = "inner_class"; 51 52 53 public static final String ATTRIBUTE = "attribute"; 54 55 56 public static final String METHOD = "method"; 57 58 59 public static final String PRIVATE = "private"; 60 61 62 public static final String PROTECTED = "protected"; 63 64 65 public static final String PUBLIC = "public"; 66 67 68 public static final String STATIC = "static"; 69 70 71 public static final String FINAL = "final"; 72 73 74 public static final String ABSTRACT = "abstract"; 75 76 77 public static final String PACKAGE = "package"; 78 79 80 public static final String TREE_INHERITANCE = "tree-inheritance"; 81 82 83 public static final String FLAT_VIEW = "flat-view"; 84 85 86 public static final String TYPE = "type"; 87 88 89 public static final String PARAMS = "params"; 90 91 92 public static final String RETURN_TYPE = "return-type"; 93 94 95 public static final String DECLARING_CLASS = "declaring-class"; 96 97 103 109 115 public Object clone(){ 116 ClassVisibilityConfig classVisibilityConfig = new ClassVisibilityConfig(); 117 Iterator it = iterator(); 118 while (it.hasNext()) { 119 String element = (String ) it.next(); 120 classVisibilityConfig.put(new String (element), true); 121 } 122 return classVisibilityConfig; 123 } 124 125 131 139 public boolean get(String key){ 140 return contains(key); 141 } 142 143 150 public void put(String key, boolean value){ 151 if(!value) 152 remove(key); 153 else if(!contains(key)) 154 add(key); 155 } 156 157 } 158 159 | Popular Tags |