ClassReference

interface ClassReference

Represents a class definition.

Inheritors

Properties

Link copied to clipboard

The set of annotations applied to this class definition.

Link copied to clipboard
abstract val classMajorVersion: Int

The major version of bytecode that this class definition targets.

Link copied to clipboard
abstract val classMinorVersion: Int

The minor version of bytecode that this class definition targets, or 0 if not set.

Link copied to clipboard

The set of constructors explicitly declared by this class.

Link copied to clipboard
abstract val fields: List<FieldReference>

The set of fields explicitly declared by this class.

Link copied to clipboard

If this is a class, these are the set of interface types implemented by this class. If this is an interface, these are the interfaces extended by this interface.

Link copied to clipboard

The set of methods explicitly declared by this class.

Link copied to clipboard
abstract val modifiers: Set<Modifier>

The set of modifiers applied to the class definition.

Link copied to clipboard
abstract val packageName: String

The name of the package this class is defined in.

Link copied to clipboard
abstract val qualifiedName: String

This class's fully-qualified class name, including its package name and simple class name.

Link copied to clipboard
abstract val simpleName: String

The declared name of this specific class.

Link copied to clipboard
abstract val superclass: ClassReference?

The supertype of this class, or null if none defined.

Functions

Link copied to clipboard
abstract fun getField(name: String): FieldReference?

Returns the declared field identified by this name, or null if none exists.

Link copied to clipboard
abstract fun getMethod(name: String): MethodReference?

Returns the declared method identified by this name, or null if none exists.

Link copied to clipboard
abstract fun toBytecode(): ByteArray

Returns the bytecode associated with this class definition.