Package org.mapstruct

Enum MappingInheritanceStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<MappingInheritanceStrategy>

    public enum MappingInheritanceStrategy
    extends java.lang.Enum<MappingInheritanceStrategy>
    Strategy for inheriting configurations given for methods of prototype mapping methods (declared on mapper config classes) to actual mapping methods declared on mappers referring to such config class via Mapper.config().
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AUTO_INHERIT_ALL_FROM_CONFIG
      Inherit the method-level forward and reverse configuration annotations automatically if source and target types of the prototype method are assignable from the types of a given mapping method.
      AUTO_INHERIT_FROM_CONFIG
      Inherit the method-level forward configuration annotations automatically if source and target types of the prototype method are assignable from the types of a given mapping method.
      AUTO_INHERIT_REVERSE_FROM_CONFIG
      Inherit the method-level reverse configuration annotations automatically if source and target types of the prototype method are assignable from the target and source types of a given mapping method.
      EXPLICIT
      Apply the method-level configuration annotations only if the prototype method is explicitly referenced using InheritConfiguration.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MappingInheritanceStrategy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static MappingInheritanceStrategy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • AUTO_INHERIT_FROM_CONFIG

        public static final MappingInheritanceStrategy AUTO_INHERIT_FROM_CONFIG
        Inherit the method-level forward configuration annotations automatically if source and target types of the prototype method are assignable from the types of a given mapping method.
      • AUTO_INHERIT_REVERSE_FROM_CONFIG

        public static final MappingInheritanceStrategy AUTO_INHERIT_REVERSE_FROM_CONFIG
        Inherit the method-level reverse configuration annotations automatically if source and target types of the prototype method are assignable from the target and source types of a given mapping method.
      • AUTO_INHERIT_ALL_FROM_CONFIG

        public static final MappingInheritanceStrategy AUTO_INHERIT_ALL_FROM_CONFIG
        Inherit the method-level forward and reverse configuration annotations automatically if source and target types of the prototype method are assignable from the types of a given mapping method.
    • Constructor Detail

      • MappingInheritanceStrategy

        private MappingInheritanceStrategy()
    • Method Detail

      • values

        public static MappingInheritanceStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MappingInheritanceStrategy c : MappingInheritanceStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MappingInheritanceStrategy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null