# Uses of Interface
org.apache.tapestry5.commons.services.Coercion

Packages that use Coercion
Package
Description
org.apache.tapestry5.commons.internal.services
org.apache.tapestry5.commons.services
org.apache.tapestry5.commons.util
org.apache.tapestry5.internal.json
[INTERNAL USE ONLY] support classes for the JSON module; API subject to change
org.apache.tapestry5.ioc.internal.util
[INTERNAL USE ONLY] utility classes for Tapestry IOC services; API subject to change

- ## Uses of Coercion in org.apache.tapestry5.commons.internal.services

  Classes in org.apache.tapestry5.commons.internal.services that implement Coercion
  Modifier and Type
  Class
  Description
  `class`
  `CompoundCoercion<S,I,T>`
  Combines two coercions to create a coercion through an intermediate type.
  Methods in org.apache.tapestry5.commons.internal.services that return Coercion
  Modifier and Type
  Method
  Description
  `<S, T> Coercion<S,T>`
  TypeCoercerImpl.`getCoercion(Class<S> sourceType, Class<T> targetType)`
  Methods in org.apache.tapestry5.commons.internal.services with parameters of type Coercion
  Modifier and Type
  Method
  Description
  `static String`
  ServiceMessages.`failedCoercion(Object input, Class targetType, Coercion coercion, Throwable cause)`
  Constructors in org.apache.tapestry5.commons.internal.services with parameters of type Coercion
  Modifier
  Constructor
  Description
  ``
  `CompoundCoercion(Coercion<S,I> op1, Coercion<I,T> op2)`

- ## Uses of Coercion in org.apache.tapestry5.commons.services

  Methods in org.apache.tapestry5.commons.services that return Coercion
  Modifier and Type
  Method
  Description
  `Coercion<S,T>`
  CoercionTuple.`getCoercion()`
  `<S, T> Coercion<S,T>`
  TypeCoercer.`getCoercion(Class<S> sourceType, Class<T> targetType)`
  Given a source and target type, computes the coercion that will be used.
  Methods in org.apache.tapestry5.commons.services with parameters of type Coercion
  Modifier and Type
  Method
  Description
  `static <S, T> void`
  CoercionTuple.`add(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration, Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)`
  Convenience method to create a coercion tuple using CoercionTuple.create(Class, Class, Coercion) and add it to a MappedConfiguration in a single step.
  `static <S, T> CoercionTuple<S,T>`
  CoercionTuple.`create(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)`
  Convenience constructor to help with generics.
  `static <S, T> void`
  CoercionTuple.`override(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration, Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)`
  Convenience method to create a coercion tuple using CoercionTuple.create(Class, Class, Coercion) and override a matching one in a MappedConfiguration in a single step.
  Constructors in org.apache.tapestry5.commons.services with parameters of type Coercion
  Modifier
  Constructor
  Description
  ``
  `CoercionTuple(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)`
  Standard constructor, which defaults wrap to true.
  ``
  `CoercionTuple(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion, boolean wrap)`
  Internal-use constructor.

- ## Uses of Coercion in org.apache.tapestry5.commons.util

  Classes in org.apache.tapestry5.commons.util that implement Coercion
  Modifier and Type
  Class
  Description
  `final class`
  `StringToEnumCoercion<T extends Enum>`
  A `Coercion` for converting strings into an instance of a particular enumerated type.

- ## Uses of Coercion in org.apache.tapestry5.internal.json

  Classes in org.apache.tapestry5.internal.json that implement Coercion
  Modifier and Type
  Class
  Description
  `class`
  `StringToJSONArray`
  `class`
  `StringToJSONObject`

- ## Uses of Coercion in org.apache.tapestry5.ioc.internal.util

  Methods in org.apache.tapestry5.ioc.internal.util with parameters of type Coercion
  Modifier and Type
  Method
  Description
  `static <S, T> Mapper<S,T>`
  InternalUtils.`toMapper(Coercion<S,T> coercion)`
  Wraps a `Coercion` as a `Mapper`.