Code example for AccessibleObject

Methods: isAccessiblesetAccessible

0
/*     */   private static final int ACCESS_TEST = 7;
/*  39 */   private static final Class<?>[] ORDERED_PRIMITIVE_TYPES = { Byte.TYPE, Short.TYPE, Character.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE };
/*     */  
/*     */   static void setAccessibleWorkaround(AccessibleObject o)
/*     */   { 
/*  55 */     if ((o == null) || (o.isAccessible())) {
/*  56 */       return; 
/*     */     } 
/*  58 */     Member m = (Member)o;
/*  59 */     if ((Modifier.isPublic(m.getModifiers())) && (isPackageAccess(m.getDeclaringClass().getModifiers())))
/*     */       try 
/*     */       { 
/*  62 */         o.setAccessible(true);
/*     */       } 
/*     */       catch (SecurityException e)
/*     */       { 
/*     */       } 
/*     */   } 
/*     */  
/*     */   static boolean isPackageAccess(int modifiers)
/*     */   {