Package org.mapstruct

Annotation Type IgnoredList


@Retention(CLASS) @Target({METHOD,ANNOTATION_TYPE}) public @interface IgnoredList
Configures the ignored list for several bean attributes.

TIP: When using Java 8 or later, you can omit the @IgnoredList wrapper annotation and directly specify several @Ignored annotations on one method.

These two examples are equal.


 // before Java 8
 @Mapper
 public interface MyMapper {
     @IgnoredList({
         @Ignored(targets = { "firstProperty" } ),
         @Ignored(targets = { "secondProperty" } )
     })
     HumanDto toHumanDto(Human human);
 }
 

 // Java 8 and later
 @Mapper
 public interface MyMapper {
     @Ignored(targets = { "firstProperty" } ),
     @Ignored(targets = { "secondProperty" } )
     HumanDto toHumanDto(Human human);
 }
 
Author:
Ivashin Aleksey
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The configuration of the bean attributes.
  • Element Details

    • value

      Ignored[] value
      The configuration of the bean attributes.
      Returns:
      The configuration of the bean attributes.