protected TicketDefinition buildTicketDefinition(final TicketCatalog plan, final String prefix,
                                                     final Class impl, final Class api) throws Throwable {
        if (plan.contains(prefix)) {
            return plan.find(prefix);
        }
        FunctionUtils.throwIf(!api.isInterface(), () -> new IllegalArgumentException("Ticket API class %s must be an interface".formatted(api.getName())));
        FunctionUtils.throwIf(impl.isInterface(), () -> new IllegalArgumentException("Ticket implementation class %s must be a concrete class".formatted(api.getName())));
        return new DefaultTicketDefinition(impl, api, prefix, Ordered.LOWEST_PRECEDENCE);
    }
This is {@link BaseTicketCatalogConfigurer}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/BaseTicketCatalogConfigurer.java