Package org.mapstruct

Annotation Type AnnotateWith.Element

Enclosing class:
AnnotateWith

public static @interface AnnotateWith.Element
Used in combination with AnnotateWith to configure the annotation elements. Only 1 value type may be used within the same annotation at a time. For example mixing shorts and ints is not allowed.
Since:
1.6
Author:
Ben Zegveld
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean[]
    cannot be used in conjunction with other value fields.
    byte[]
    cannot be used in conjunction with other value fields.
    char[]
    cannot be used in conjunction with other value fields.
    Class<?>[]
    cannot be used in conjunction with other value fields.
    double[]
    cannot be used in conjunction with other value fields.
    Class<? extends Enum<?>>
    only used in conjunction with the enums() annotation element.
    cannot be used in conjunction with other value fields.
    float[]
    cannot be used in conjunction with other value fields.
    int[]
    cannot be used in conjunction with other value fields.
    long[]
    cannot be used in conjunction with other value fields.
    The name of the annotation element.
    short[]
    cannot be used in conjunction with other value fields.
    cannot be used in conjunction with other value fields.
  • Element Details

    • name

      String name
      The name of the annotation element.
      Returns:
      name of the annotation element.
      Default:
      "value"
    • shorts

      short[] shorts
      cannot be used in conjunction with other value fields.
      Returns:
      short value(s) for the annotation element.
      Default:
      {}
    • bytes

      byte[] bytes
      cannot be used in conjunction with other value fields.
      Returns:
      byte value(s) for the annotation element.
      Default:
      {}
    • ints

      int[] ints
      cannot be used in conjunction with other value fields.
      Returns:
      int value(s) for the annotation element.
      Default:
      {}
    • longs

      long[] longs
      cannot be used in conjunction with other value fields.
      Returns:
      long value(s) for the annotation element.
      Default:
      {}
    • floats

      float[] floats
      cannot be used in conjunction with other value fields.
      Returns:
      float value(s) for the annotation element.
      Default:
      {}
    • doubles

      double[] doubles
      cannot be used in conjunction with other value fields.
      Returns:
      double value(s) for the annotation element.
      Default:
      {}
    • chars

      char[] chars
      cannot be used in conjunction with other value fields.
      Returns:
      char value(s) for the annotation element.
      Default:
      {}
    • booleans

      boolean[] booleans
      cannot be used in conjunction with other value fields.
      Returns:
      boolean value(s) for the annotation element.
      Default:
      {}
    • strings

      String[] strings
      cannot be used in conjunction with other value fields.
      Returns:
      string value(s) for the annotation element.
      Default:
      {}
    • classes

      Class<?>[] classes
      cannot be used in conjunction with other value fields.
      Returns:
      class value(s) for the annotation element.
      Default:
      {}
    • enumClass

      Class<? extends Enum<?>> enumClass
      only used in conjunction with the enums() annotation element.
      Returns:
      the class of the enum.
      Default:
      org.mapstruct.NullEnum.class
    • enums

      String[] enums
      cannot be used in conjunction with other value fields. enumClass() is also required when using enums()
      Returns:
      enum value(s) for the annotation element.
      Default:
      {}