329 /** 330 * Gets the list of package names that will be used for 331 * finding BeanInfo classes. 332 * 333 * @return The array of package names that will be searched in 334 * order to find BeanInfo classes. The default value 335 * for this array is implementation-dependent; e.g. 336 * Sun implementation initially sets to {"sun.beans.infos"}. 337 */ 338 339 public static String[] getBeanInfoSearchPath() { 340 return ThreadGroupContext.getContext().getBeanInfoFinder().getPackages(); 341 } 342 343 /** 344 * Change the list of package names that will be used for 345 * finding BeanInfo classes. The behaviour of 346 * this method is undefined if parameter path 347 * is null. 348 * 349 * <p>First, if there is a security manager, its <code>checkPropertiesAccess</code> 350 * method is called. This could result in a SecurityException. 351 * 352 * @param path Array of package names. 353 * @exception SecurityException if a security manager exists and its 354 * <code>checkPropertiesAccess</code> method doesn't allow setting 355 * of system properties. 356 * @see SecurityManager#checkPropertiesAccess 357 */ 358 359 public static void setBeanInfoSearchPath(String[] path) { 360 SecurityManager sm = System.getSecurityManager(); 361 if (sm != null) { 362 sm.checkPropertiesAccess(); 363 } 364 ThreadGroupContext.getContext().getBeanInfoFinder().setPackages(path); 365 } 366 367 368 /** 369 * Flush all of the Introspector's internal caches. This method is 370 * not normally required. It is normally only needed by advanced 371 * tools that update existing "Class" objects in-place and need 372 * to make the Introspector re-analyze existing Class objects. 373 * 374 * @since 1.2 | 329 /** 330 * Gets the list of package names that will be used for 331 * finding BeanInfo classes. 332 * 333 * @return The array of package names that will be searched in 334 * order to find BeanInfo classes. The default value 335 * for this array is implementation-dependent; e.g. 336 * Sun implementation initially sets to {"sun.beans.infos"}. 337 */ 338 339 public static String[] getBeanInfoSearchPath() { 340 return ThreadGroupContext.getContext().getBeanInfoFinder().getPackages(); 341 } 342 343 /** 344 * Change the list of package names that will be used for 345 * finding BeanInfo classes. The behaviour of 346 * this method is undefined if parameter path 347 * is null. 348 * 349 * <p>First, if there is a security manager, its {@code checkPropertiesAccess} 350 * method is called. This could result in a SecurityException. 351 * 352 * @param path Array of package names. 353 * @exception SecurityException if a security manager exists and its 354 * {@code checkPropertiesAccess} method doesn't allow setting 355 * of system properties. 356 * @see SecurityManager#checkPropertiesAccess 357 */ 358 359 public static void setBeanInfoSearchPath(String[] path) { 360 SecurityManager sm = System.getSecurityManager(); 361 if (sm != null) { 362 sm.checkPropertiesAccess(); 363 } 364 ThreadGroupContext.getContext().getBeanInfoFinder().setPackages(path); 365 } 366 367 368 /** 369 * Flush all of the Introspector's internal caches. This method is 370 * not normally required. It is normally only needed by advanced 371 * tools that update existing "Class" objects in-place and need 372 * to make the Introspector re-analyze existing Class objects. 373 * 374 * @since 1.2 |