public static class SimpleTypeCasterFactory.CharacterCaster extends Object implements SimpleTypeCaster, TypeWidenerSPI
Modifier and Type | Field and Description |
---|---|
static SimpleTypeCasterFactory.CharacterCaster |
INSTANCE |
EPTYPE
Modifier and Type | Method and Description |
---|---|
Object |
cast(Object object)
Casts an object to another type, typically for numeric types.
|
CodegenExpression |
codegen(CodegenExpression input,
EPTypeClass inputType,
CodegenMethodScope codegenMethodScope,
CodegenClassScope codegenClassScope) |
boolean |
isNumericCast()
Returns true to indicate that the cast target type is numeric.
|
Object |
widen(Object input)
Ctor.
|
CodegenExpression |
widenCodegen(CodegenExpression expression,
CodegenMethodScope codegenMethodScope,
CodegenClassScope codegenClassScope) |
public static final SimpleTypeCasterFactory.CharacterCaster INSTANCE
public Object cast(Object object)
SimpleTypeCaster
May performs a compatibility check and returns null if not compatible.
cast
in interface SimpleTypeCaster
object
- to castpublic Object widen(Object input)
TypeWidenerSPI
widen
in interface TypeWidener
widen
in interface TypeWidenerSPI
input
- the object to widen.public boolean isNumericCast()
SimpleTypeCaster
isNumericCast
in interface SimpleTypeCaster
public CodegenExpression widenCodegen(CodegenExpression expression, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
widenCodegen
in interface TypeWidenerSPI
public CodegenExpression codegen(CodegenExpression input, EPTypeClass inputType, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope)
codegen
in interface SimpleTypeCaster
Copyright © 2005–2021. All rights reserved.