/*[deutsch]
<p>Liefert ein getyptes Singleton pro {@code ChronoEntity}-Klasse. </p>

@param   <T> generic type of time context
@param   chronoType  chronological type
@return  chronology or {@code null} if not found
766853
public static <T> Chronology<T> lookup(Class<T> chronoType) {

        try {
            // Initialisierung der Klasse anstoßen, wenn noch nicht erfolgt
            Class.forName(
                chronoType.getName(),
                true,
                chronoType.getClassLoader());
        } catch (ClassNotFoundException cnfe) {
            throw new IllegalStateException(cnfe);
        }

        Chronology<?> ret = null;
        boolean purged = false;

        for (ChronoReference cref : CHRONOS) {
            Chronology<?> chronology = cref.get();

            if (chronology == null) {
                purged = true;
            } else if (chronology.getChronoType() == chronoType) {
                ret = chronology;
                break;
            }
        }

        if (purged) {
            purgeQueue();
        }

        return cast(ret); // type-safe

    }
99889
@Override
    @SuppressWarnings("unchecked")
    public ChronoZonedDateTime<EthiopicDate> zonedDateTime(TemporalAccessor temporal) {
        return (ChronoZonedDateTime<EthiopicDate>) super.zonedDateTime(temporal);
    }
137647
public static final <T extends Date> Function<T, MutableDateTime> dateToMutableDateTime(Chronology chronology) {
		return new DateToMutableDateTime<T>(chronology);
	}
986390
@Override
    @SuppressWarnings("unchecked")
    public ChronoZonedDateTime<PaxDate> zonedDateTime(TemporalAccessor temporal) {
        return (ChronoZonedDateTime<PaxDate>) super.zonedDateTime(temporal);
    }
727847
public Chronology withZone(DateTimeZone zone) {
        if (zone == null) {
            zone = DateTimeZone.getDefault();
        }
        if (zone == getZone()) {
            return this;
        }
        return getInstance(zone, iCutoverInstant, getMinimumDaysInFirstWeek());
    }
1121692
private TimeType getTimeType(NameType nameType) {
        switch (nameType) {
        case LONG_STANDARD:
        case SHORT_STANDARD:
            return TimeType.STANDARD;

        case LONG_DAYLIGHT:
        case SHORT_DAYLIGHT:
            return TimeType.DAYLIGHT;

        default:
            return TimeType.UNKNOWN;
        }
    }
257284
@Override
    @SuppressWarnings("unchecked")
    public ChronoZonedDateTime<Symmetry010Date> zonedDateTime(TemporalAccessor temporal) {
        return (ChronoZonedDateTime<Symmetry010Date>) super.zonedDateTime(temporal);
    }
1201800
void setParsed(Chronology chrono) {
        Jdk8Methods.requireNonNull(chrono, "chrono");
        Parsed currentParsed = currentParsed();
        currentParsed.chrono = chrono;
        if (currentParsed.callbacks != null) {
            List<Object[]> callbacks = new ArrayList<Object[]>(currentParsed.callbacks);
            currentParsed.callbacks.clear();
            for (Object[] objects : callbacks) {
                ReducedPrinterParser pp = (ReducedPrinterParser) objects[0];
                pp.setValue(this, (Long) objects[1], (Integer) objects[2], (Integer) objects[3]);
            }
        }
    }
732928
public static CalendarText getInstance(
        Chronology<?> chronology,
        Locale locale
    ) {

        return getInstance(extractCalendarType(chronology), locale);

    }
338289
@Override  // for covariant return type
    @SuppressWarnings("unchecked")
    public ChronoLocalDateTime<PaxDate> atTime(LocalTime localTime) {
        return (ChronoLocalDateTime<PaxDate>) super.atTime(localTime);
    }
1207940
@Override  // for covariant return type
    @SuppressWarnings("unchecked")
    public ChronoLocalDateTime<DiscordianDate> atTime(LocalTime localTime) {
        return (ChronoLocalDateTime<DiscordianDate>) super.atTime(localTime);
    }
151739
public com.google.protobuf.ByteString
      getTimelineLabelBytes() {
    java.lang.Object ref = timelineLabel_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      timelineLabel_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
329502
public static final <T extends Date> Function<T, DateTime> dateToDateTime(Chronology chronology) {
		return new DateToDateTime<T>(chronology);
	}
930975
@Override
    @SuppressWarnings("unchecked")
    public ChronoZonedDateTime<JulianDate> zonedDateTime(TemporalAccessor temporal) {
        return (ChronoZonedDateTime<JulianDate>) super.zonedDateTime(temporal);
    }
104339
@SuppressWarnings("unchecked")
    public static <T extends ChronoEntity<T>> MultiFormatParser<T> of(List<ChronoFormatter<T>> formats) {

        ChronoFormatter<T>[] parsers =
            formats.toArray((ChronoFormatter<T>[]) Array.newInstance(ChronoFormatter.class, formats.size()));
        return new MultiFormatParser<>(parsers);

    }
35507
@Override
    @SuppressWarnings("unchecked")
    public ChronoLocalDateTime<JulianDate> localDateTime(TemporalAccessor temporal) {
        return (ChronoLocalDateTime<JulianDate>) super.localDateTime(temporal);
    }
986917
@SuppressWarnings("unchecked")
    @Override
    public <R> R query(TemporalQuery<R> query) {
        if (query == TemporalQueries.chronology()) {
            return (R) getChronology();
        } else if (query == TemporalQueries.precision()) {
            return (R) NANOS;
        } else if (query == TemporalQueries.localDate()) {
            return (R) LocalDate.ofEpochDay(toLocalDate().toEpochDay());
        } else if (query == TemporalQueries.localTime()) {
            return (R) toLocalTime();
        } else if (query == TemporalQueries.zone() || query == TemporalQueries.zoneId() || query == TemporalQueries.offset()) {
            return null;
        }
        return super.query(query);
    }