Class LifecycleCallbackMethodReference

  • All Implemented Interfaces:
    Assignment, Writable

    public class LifecycleCallbackMethodReference
    extends MethodReference
    Represents a reference to a method that is annotated with @BeforeMapping or @AfterMapping.
    Author:
    Andreas Gudian
    • Method Detail

      • getDeclaringType

        public Type getDeclaringType()
      • getMethodReturnType

        public Type getMethodReturnType()
        Returns the return type of the mapping method in which this callback method is called
        Returns:
        return type
        See Also:
        Method.getReturnType()
      • getMethodResultType

        public Type getMethodResultType()
        Returns the result type of the mapping method in which this callback method is called
        Returns:
        result type
        See Also:
        Method.getResultType()
      • getTargetVariableName

        public String getTargetVariableName()
      • getImportTypes

        public Set<Type> getImportTypes()
        Description copied from class: ModelElement
        Returns a set containing those Types referenced by this model element for which an import statement needs to be declared.
        Specified by:
        getImportTypes in interface Assignment
        Overrides:
        getImportTypes in class MethodReference
        Returns:
        A set with type referenced by this model element. Must not be null.
      • hasMappingTargetParameter

        public boolean hasMappingTargetParameter()
      • hasReturnType

        public boolean hasReturnType()
        Returns:
        true if this callback method has a return type that is not void