class JodaTimeSingleFieldPeriodConverter extends AbstractConverter {

    @Override
    public boolean canHandle(Object source, TypeToken<?> targetTypeToken) {
        return targetTypeToken.isSubtypeOf(BaseSingleFieldPeriod.class)
                && ((source instanceof Number) || (stringToNumberConverter.canHandle(source, TypeToken.of(Long.class))));
    }

}