|
36 | 36 | import static java.lang.ClassLoader.getSystemClassLoader; |
37 | 37 |
|
38 | 38 | /** |
39 | | - * Abstract {@link URLClassPathHandle} |
| 39 | + * Abstract implementation of {@link URLClassPathHandle} that provides a base for handling URL Class-Path entries. |
| 40 | + * |
| 41 | + * <p>This class offers reflective access to internal structures like the {@code ucp}, {@code urls}, and |
| 42 | + * {@code loaders} fields used by the JVM's class loading mechanism. It is primarily designed for advanced use cases |
| 43 | + * where fine-grained control over class loader URLs is required, such as dynamic removal or modification of URLs from |
| 44 | + * a class loader. |
| 45 | + * |
| 46 | + * <h2>Key Features:</h2> |
| 47 | + * <ul> |
| 48 | + * <li>Supports reflective manipulation of internal JVM class loading structures.</li> |
| 49 | + * <li>Provides abstraction over different versions of JVM internals (e.g., classic vs modern JDK).</li> |
| 50 | + * <li>Implements the {@link Prioritized} interface to allow prioritization among multiple handlers.</li> |
| 51 | + * </ul> |
| 52 | + * |
| 53 | + * <h2>Example Usage:</h2> |
| 54 | + * <pre>{@code |
| 55 | + * public class ClassicURLClassPathHandle extends AbstractURLClassPathHandle { |
| 56 | + * |
| 57 | + * public ClassicURLClassPathHandle() { |
| 58 | + * // Default constructor |
| 59 | + * } |
| 60 | + * |
| 61 | + * protected String getURLClassPathClassName() { |
| 62 | + * return "sun.misc.URLClassPath"; |
| 63 | + * } |
| 64 | + * |
| 65 | + * protected String getUrlsFieldName() { |
| 66 | + * return "urls"; // Classic field name |
| 67 | + * } |
| 68 | + * } |
| 69 | + * }</pre> |
40 | 70 | * |
41 | 71 | * @author <a href="mailto:mercyblitz@gmail.com">Mercy<a/> |
42 | 72 | * @see ClassicURLClassPathHandle |
43 | 73 | * @see ModernURLClassPathHandle |
44 | 74 | * @see URLClassPathHandle |
| 75 | + * @see Prioritized |
45 | 76 | * @since 1.0.0 |
46 | 77 | */ |
47 | 78 | public abstract class AbstractURLClassPathHandle implements URLClassPathHandle, Prioritized { |
|
0 commit comments