Package javassist.runtime
Class Desc
java.lang.Object
javassist.runtime.Desc
A support class for implementing
$sig
and
$type
.
This support class is required at runtime
only if $sig
or $type
is used.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadLocal
<Boolean> static boolean
Specifies how ajava.lang.Class
object is loaded. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Class
<?> getClassObject
(String name) private static Class<?>[]
getClassType
(String desc, int descLen, int start, int num) static Class
<?> Interprets the given class name.static Class<?>[]
Interprets the given type descriptor representing a method signature.static Class
<?> Interprets the given type descriptor.private static Class<?>[]
static void
Changes so that the current thread will not use the context class loader when a class is loaded.static void
Changes so that the current thread will use the context class loader when a class is loaded.
-
Field Details
-
useContextClassLoader
public static boolean useContextClassLoaderSpecifies how ajava.lang.Class
object is loaded.If true, it is loaded by:
Thread.currentThread().getContextClassLoader().loadClass()
If false, it is loaded by
Class.forName()
. The default value is false. -
USE_CONTEXT_CLASS_LOADER_LOCALLY
-
-
Constructor Details
-
Desc
public Desc()
-
-
Method Details
-
setUseContextClassLoaderLocally
public static void setUseContextClassLoaderLocally()Changes so that the current thread will use the context class loader when a class is loaded. This method changes the behavior per thread unlikeuseContextClassLoader
.- Since:
- 3.25
-
resetUseContextClassLoaderLocally
public static void resetUseContextClassLoaderLocally()Changes so that the current thread will not use the context class loader when a class is loaded. Call this method before releasing the current thread for reuse. It invokesThreadLocal.remvoe()
.- Since:
- 3.25
-
getClassObject
- Throws:
ClassNotFoundException
-
getClazz
Interprets the given class name. It is used for implementing$class
. -
getParams
Interprets the given type descriptor representing a method signature. It is used for implementing$sig
. -
getType
Interprets the given type descriptor. It is used for implementing$type
. -
getType
-
getClassType
-