isFinal abstract method

bool isFinal()

Checks if this class is final (cannot be extended).

Returns:

  • true if the class is declared with final modifier
  • false for extendable classes

Example:

final class Immutable {}
class Mutable {}

Class.forType<Immutable>().isFinal(); // true
Class.forType<Mutable>().isFinal();   // false

Implementation

bool isFinal();