public static enum ClassLoaderUtils.ParentStrategy extends java.lang.Enum<ClassLoaderUtils.ParentStrategy>
parent为null时策略defaultParentLoader 使用default parent class loader,参见URLClassLoader.newInstance(URL[])threadContextLoader 使用当前线程的Thread Context ClassLoader作为parent,参见Thread.getContextClassLoader() currentClassLoader 使用当前类(ClassLoaderUtils)的class loader| Enum Constant and Description |
|---|
currentClassLoader |
defaultParentLoader |
threadContextLoader |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoaderUtils.ParentStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ClassLoaderUtils.ParentStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClassLoaderUtils.ParentStrategy defaultParentLoader
public static final ClassLoaderUtils.ParentStrategy threadContextLoader
public static final ClassLoaderUtils.ParentStrategy currentClassLoader
public static ClassLoaderUtils.ParentStrategy[] values()
for (ClassLoaderUtils.ParentStrategy c : ClassLoaderUtils.ParentStrategy.values()) System.out.println(c);
public static ClassLoaderUtils.ParentStrategy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullCopyright © 2019. All rights reserved.