1 26 27 package org.objectweb.util.browser.plugin.java.reflect; 28 29 import java.lang.reflect.Modifier ; 30 31 32 40 public abstract class MemberUtil { 41 42 48 49 protected ClassVisibilityConfig config_; 50 51 57 public MemberUtil(){ 58 this(ClassVisibility.createNewDefaultConfig()); 59 } 60 61 public MemberUtil(ClassVisibilityConfig config) { 62 config_ = config; 63 } 64 65 71 77 public String getVisibility(int modifier){ 78 String visibility = null; 79 if (Modifier.isPublic(modifier)) 80 visibility = "public"; 81 else if (Modifier.isProtected(modifier)) 82 visibility = "protected"; 83 else if (Modifier.isPrivate(modifier)) 84 visibility = "private"; 85 else 86 return null; 87 return visibility; 88 } 89 } 90 91 | Popular Tags |