public class BasePrimitiveCoercer extends StandardCoercer implements IResolvingCoercer
| Modifier and Type | Field and Description |
|---|---|
static LockingLazyVar<BasePrimitiveCoercer> |
BooleanPCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
BytePCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
CharPCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
DoublePCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
FloatPCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
IntPCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
LongPCoercer |
static LockingLazyVar<BasePrimitiveCoercer> |
ShortPCoercer |
MAX_PRIORITY| Constructor and Description |
|---|
BasePrimitiveCoercer(ICoercer nonPrimitiveCoercer,
IType primitiveType,
IType nonPrimitiveType) |
| Modifier and Type | Method and Description |
|---|---|
Object |
coerceValue(IType typeToCoerceTo,
Object value) |
int |
getPriority(IType to,
IType from) |
static int |
getPriorityOf(IType to,
IType from) |
boolean |
handlesNull() |
static int |
losesInformation(IType from,
IType to) |
IType |
resolveType(IType target,
IType source)
This method should produce a more appropriately parameterized type for the given target type for this
coercion.
|
isExplicitCoercionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExplicitCoercionpublic static final LockingLazyVar<BasePrimitiveCoercer> DoublePCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> FloatPCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> BooleanPCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> BytePCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> ShortPCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> CharPCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> IntPCoercer
public static final LockingLazyVar<BasePrimitiveCoercer> LongPCoercer
public final Object coerceValue(IType typeToCoerceTo, Object value)
coerceValue in interface ICoercerpublic boolean handlesNull()
handlesNull in interface ICoercerhandlesNull in class StandardCoercerpublic IType resolveType(IType target, IType source)
IResolvingCoercerThis method should produce a more appropriately parameterized type for the given target type for this
coercion. This allows a coercion to communicate type information through the coercion process. An example
is the MetaType-to-Class coercion. MetaType
If no more appropriate inference type exists, this method should return the source type.
resolveType in interface IResolvingCoercertarget - typepublic int getPriority(IType to, IType from)
getPriority in interface ICoercergetPriority in class StandardCoercerCopyright © 2016. All rights reserved.