Class MappingResolverImpl.ResolvingAttempt

  • Enclosing class:
    MappingResolverImpl

    private class MappingResolverImpl.ResolvingAttempt
    extends java.lang.Object
    • Field Detail

      • mappingMethod

        private final Method mappingMethod
      • methods

        private final java.util.List<Method> methods
      • sourceRHS

        private final SourceRHS sourceRHS
      • positionHint

        private final javax.lang.model.element.AnnotationMirror positionHint
      • forger

        private final java.util.function.Supplier<Assignment> forger
      • reportingLimitAmbiguous

        private final int reportingLimitAmbiguous
    • Method Detail

      • filterPossibleCandidateMethods

        private <T extends Method> java.util.List<T> filterPossibleCandidateMethods​(java.util.List<T> candidateMethods,
                                                                                    T mappingMethod)
      • isNotSelfOrSelfAllowed

        private <T extends Method> boolean isNotSelfOrSelfAllowed​(T mappingMethod,
                                                                  T candidate)
      • getTargetAssignment

        private Assignment getTargetAssignment​(Type sourceType,
                                               Type targetType)
      • hasQualfiers

        private boolean hasQualfiers()
      • printQualifierMessage

        private void printQualifierMessage​(SelectionCriteria selectionCriteria)
      • allowDirect

        private boolean allowDirect​(Type sourceType,
                                    Type targetType)
      • allowDirect

        private boolean allowDirect​(Type type)
      • allowConversion

        private boolean allowConversion()
      • allowMappingMethod

        private boolean allowMappingMethod()
      • allow2Steps

        private boolean allow2Steps()
      • isCandidateForMapping

        private boolean isCandidateForMapping​(Method methodCandidate)
      • isCreateMethodForMapping

        private boolean isCreateMethodForMapping​(Method methodCandidate)
      • isUpdateMethodForMapping

        private boolean isUpdateMethodForMapping​(Method methodCandidate)
      • getBestMatch

        private <T extends Method> java.util.List<SelectedMethod<T>> getBestMatch​(java.util.List<T> methods,
                                                                                  Type source,
                                                                                  Type target)
      • reportErrorWhenAmbiguous

        private <T extends Method> void reportErrorWhenAmbiguous​(java.util.List<SelectedMethod<T>> candidates,
                                                                 Type target)
      • isAssignableThroughCollectionCopyConstructor

        private boolean isAssignableThroughCollectionCopyConstructor​(Type sourceType,
                                                                     Type targetType)
        Whether the given source and target type are both a collection type or both a map type and the source value can be propagated via a copy constructor.
      • hasCompatibleCopyConstructor

        private boolean hasCompatibleCopyConstructor​(Type sourceType,
                                                     Type targetType)
        Whether the given target type has a single-argument constructor which accepts the given source type.
        Parameters:
        sourceType - the source type
        targetType - the target type
        Returns:
        true if the target type has a constructor accepting the given source type, false otherwise.
      • join

        private <T extends Method> java.lang.String join​(java.util.List<SelectedMethod<T>> candidates)