Class LifecycleMethodResolver

    • Method Detail

      • beforeMappingMethods

        public static List<LifecycleCallbackMethodReference> beforeMappingMethods​(Method method,
                                                                                  Type alternativeTarget,
                                                                                  SelectionParameters selectionParameters,
                                                                                  MappingBuilderContext ctx,
                                                                                  Set<String> existingVariableNames)
        Parameters:
        method - the method to obtain the beforeMapping methods for
        alternativeTarget - alternative to Method.getResultType() e.g. when target is abstract
        selectionParameters - method selectionParameters
        ctx - the builder context
        existingVariableNames - the existing variable names in the mapping method
        Returns:
        all applicable @BeforeMapping methods for the given method
      • afterMappingMethods

        public static List<LifecycleCallbackMethodReference> afterMappingMethods​(Method method,
                                                                                 Type alternativeTarget,
                                                                                 SelectionParameters selectionParameters,
                                                                                 MappingBuilderContext ctx,
                                                                                 Set<String> existingVariableNames)
        Parameters:
        method - the method to obtain the afterMapping methods for
        alternativeTarget - alternative to Method.getResultType() e.g. when target is abstract
        selectionParameters - method selectionParameters
        ctx - the builder context
        existingVariableNames - list of already used variable names
        Returns:
        all applicable @AfterMapping methods for the given method
      • beforeMappingMethods

        public static List<LifecycleCallbackMethodReference> beforeMappingMethods​(Method method,
                                                                                  SelectionParameters selectionParameters,
                                                                                  MappingBuilderContext ctx,
                                                                                  Set<String> existingVariableNames)
        Parameters:
        method - the method to obtain the beforeMapping methods for
        selectionParameters - method selectionParameters
        ctx - the builder context
        existingVariableNames - the existing variable names in the mapping method
        Returns:
        all applicable @BeforeMapping methods for the given method
      • afterMappingMethods

        public static List<LifecycleCallbackMethodReference> afterMappingMethods​(Method method,
                                                                                 SelectionParameters selectionParameters,
                                                                                 MappingBuilderContext ctx,
                                                                                 Set<String> existingVariableNames)
        Parameters:
        method - the method to obtain the afterMapping methods for
        selectionParameters - method selectionParameters
        ctx - the builder context
        existingVariableNames - list of already used variable names
        Returns:
        all applicable @AfterMapping methods for the given method