Package org.apache.sis.internal.converter
package org.apache.sis.internal.converter
Default set of
ObjectConverter
implementations.
Converter for a given pair of source and target classes
can be obtained with ConverterRegistry
.
A system-wide instance of ConverterRegistry
with a default set of conversions
is available as SystemRegistry.INSTANCE
.
Adding system-wide converters
Applications can add system-wide custom converters either by explicit calls to theSystemRegistry.INSTANCE.register(ObjectConverter)
method, or by listing the
fully qualified classnames of their ObjectConverter
instances
in a file having exactly the following name:
Applications deployed in a modularization framework like OSGi shall use only the
META-INF
approach, because system converters are discarded every time the
classpath changes. Having the converters declared in META-INF
ensure that
they will be reloaded when needed.
Alternatively, applications can also use their own ConverterRegistry
instance.
Non-system instances do not scan for META-INF
and do not discard their content on
classpath changes.
- Since:
- 0.3
- Version:
- 1.0
-
ClassesClassDescriptionThe inverse of
AngleConverter
.ArrayConverter<S,T> Handles conversions between arrays.Handles conversions fromCharSequence
toString
, then forward to another converter fromString
to various objects.ClassPair<S,T> Holds explicitClassPair.sourceClass
andClassPair.targetClass
values.Handles conversions fromCollection
to various objects.Converter fromCollection
toList
.Converter fromCollection
toSet
.Columns in the string representation of converter chains.A collection ofObjectConverter
instances.Handles conversions fromDate
to various objects.Converter fromLong
toDate
.Converter fromDate
toLong
.FromDate
to SQLDate
.FromDate
to SQLTimestamp
.FallbackConverter<S,T> Fallback to be used when the first converter failed.Handles conversions fromFraction
to other kind of numbers.The inverse ofFractionConverter
.IdentityConverter<S extends T,T> An object converter which returns the source unchanged.Handles conversions fromNumber
to other kind of numbers.NumberConverter.Comparable<S extends Number>Converter from numbers to comparables.Handles conversions from arbitrary objects toString
.ObjectToString.CodeList<S extends org.opengis.util.CodeList<S>>Specialized instance forCodeList
.ObjectToString.Enum<S extends Enum<S>>Specialized instance forEnum
.PathConverter<S,T> Handles conversions betweenString
and various kinds of objects.StringConverter.CodeList<T extends org.opengis.util.CodeList<T>>Converter fromString
toCodeList
.StringConverter.Enum<T extends Enum<T>>SurjectiveConverter<S,T> Base class for (usually non-invertible) surjectiveObjectConverter
s.SystemConverter<S,T> Base class of all converters defined in theorg.apache.sis.internal
package.The Apache SIS system-wideConverterRegistry
.