@JsonIgnore
    default boolean isCode() {
        return this instanceof OAuth20Code;
    }
Is this an oauth code?

@return true/false
support/cas-server-support-oauth-api/src/main/java/org/apereo/cas/ticket/OAuth20Token.java