Using Class#getModifiers
:
Modifier.isFinal(clz.getModifiers())
The modifiers of a class (or field, or method) are represented as a packed-bit int
in the reflection API. Each possible modifier has its own bit mask, and the Modifier
class helps in masking out those bits.
You can check for the following modfiers:
abstract
final
interface
native
private
protected
public
static
strictfp
synchronized
transient
volatile