Top Description Fields Constructors Methods
javassist.runtime

public Class Desc

extends Object
Class Inheritance

A support class for implementing $sig and $type. This support class is required at runtime only if $sig or $type is used.

Field Summary

Modifier and TypeField and Description
private static final ThreadLocal<Boolean>
public static boolean
useContextClassLoader

Specifies how a java.lang.Class object is loaded.

Constructor Summary

AccessConstructor and Description
public
Desc()

Method Summary

Modifier and TypeMethod and Description
private static Class<?>
private static Class<?>[]
getClassType(String desc, int descLen, int start, int num)

public static Class<?>
getClazz(String name)

Interprets the given class name.

public static Class<?>[]
getParams(String desc)

Interprets the given type descriptor representing a method signature.

public static Class<?>
getType(String desc)

Interprets the given type descriptor.

private static Class<?>[]
getType(String desc, int descLen, int start, int num)

public static void
resetUseContextClassLoaderLocally()

Changes so that the current thread will not use the context class loader when a class is loaded.

public static void
setUseContextClassLoaderLocally()

Changes so that the current thread will use the context class loader when a class is loaded.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

USE_CONTEXT_CLASS_LOADER_LOCALLYback to summary
private static final ThreadLocal<Boolean> USE_CONTEXT_CLASS_LOADER_LOCALLY
useContextClassLoaderback to summary
public static boolean useContextClassLoader

Specifies how a java.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.

Constructor Detail

Descback to summary
public Desc()

Method Detail

getClassObjectback to summary
private static Class<?> getClassObject(String name) throws ClassNotFoundException
getClassTypeback to summary
private static Class<?>[] getClassType(String desc, int descLen, int start, int num)
getClazzback to summary
public static Class<?> getClazz(String name)

Interprets the given class name. It is used for implementing $class.

getParamsback to summary
public static Class<?>[] getParams(String desc)

Interprets the given type descriptor representing a method signature. It is used for implementing $sig.

getTypeback to summary
public static Class<?> getType(String desc)

Interprets the given type descriptor. It is used for implementing $type.

getTypeback to summary
private static Class<?>[] getType(String desc, int descLen, int start, int num)
resetUseContextClassLoaderLocallyback to summary
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 invokes ThreadLocal.remvoe().

Since
3.25
setUseContextClassLoaderLocallyback to summary
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 unlike useContextClassLoader.

Since
3.25