Classpath

interface Classpath

Represents a set of classes that are available at runtime.

The full set of runtime classes is likely more than what is represented here, which is why calling get for any unknown classes will return a virtual class definition that can still be referenced as usual. However, these virtual classes will be ignored when exporting the classpath via toGenericJarArchive, and won't include all the information (like supertypes, declared functions, etc) that the real class would.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The primitive Byte type.

Link copied to clipboard

The primitive Char type.

Link copied to clipboard
abstract val classes: Set<ClassReference>

The set of all input classes that will be packaged in this JAR.

Link copied to clipboard

The platform Class type.

Link copied to clipboard

The primitive Double type.

Link copied to clipboard

The primitive Float type.

Link copied to clipboard

The primitive Int type.

Link copied to clipboard

The primitive Long type.

Link copied to clipboard

The platform Object type.

Link copied to clipboard

The primitive Short type.

Link copied to clipboard

The platform String type.

Link copied to clipboard

The primitive Void type.

Functions

Link copied to clipboard
abstract operator fun get(clazz: Class<*>): ClassReference

Returns the class definition for the given class, or throws if one does not exist.

abstract operator fun get(className: String): ClassReference

Returns the class definition for the given class name, or returns a virtual definition if one does not exist. Virtual definitions won't include all the information (like supertypes, declared functions, etc) that the real class would, they are simply a placeholder for referencing a type from another compilation unit.

Link copied to clipboard
abstract fun getOrNull(className: String): ClassReference?

Returns the class definition for the given class name, or null if none exists.

Link copied to clipboard

Returns the classpath as a JAR representation.