Class TypeVariableCoercer

  • All Implemented Interfaces:
    ICoercer

    public class TypeVariableCoercer
    extends java.lang.Object
    implements ICoercer
    • Constructor Detail

      • TypeVariableCoercer

        public TypeVariableCoercer()
    • Method Detail

      • coerceValue

        public java.lang.Object coerceValue​(IType typeToCoerceTo,
                                            java.lang.Object value)
        Specified by:
        coerceValue in interface ICoercer
      • handlesNull

        public boolean handlesNull()
        Specified by:
        handlesNull in interface ICoercer
        Returns:
        true if this coercer knows how to handle the null value.
      • getPriority

        public int getPriority​(IType to,
                               IType from)
        Specified by:
        getPriority in interface ICoercer
        Returns:
        a value between 0 and MAX_PRIORITY, inclusive that indicates the priority of this coercer when resolving overloaded methods. Typically a coercer should return 0, but coercers that have a high affinity between the target and coerced type, such as primitives, can have higher priorities.