Interface Assigner

    • Field Detail

      • DEFAULT

        static final Assigner DEFAULT
        A default assigner that can handle void, primitive types and reference types which considers generic types as raw types.
      • GENERICS_AWARE

        static final Assigner GENERICS_AWARE
        A generics-aware assigner that can handle void, primitive types which reference types.
    • Method Detail

      • assign

        StackManipulation assign​(TypeDescription.Generic source,
                                 TypeDescription.Generic target,
                                 Assigner.Typing typing)
        Parameters:
        source - The original type that is to be transformed into the targetType.
        target - The target type into which the sourceType is to be converted.
        typing - A hint whether the assignment should consider the runtime type of the source type, i.e. if type down or cross castings are allowed. If this hint is set, this is also an indication that void to non-void assignments are permitted.
        Returns:
        A stack manipulation that transforms the sourceType into the targetType if this is possible. An illegal stack manipulation otherwise.