mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#2788 Improve unmapped source properties message for forged methods
This commit is contained in:
parent
ca1fd0d85d
commit
bb1cd63485
@ -1718,53 +1718,21 @@ public class BeanMappingMethod extends NormalTypeMappingMethod {
|
|||||||
}
|
}
|
||||||
else if ( !unprocessedTargetProperties.isEmpty() && unmappedTargetPolicy.requiresReport() ) {
|
else if ( !unprocessedTargetProperties.isEmpty() && unmappedTargetPolicy.requiresReport() ) {
|
||||||
|
|
||||||
if ( !( method instanceof ForgedMethod ) ) {
|
Message unmappedPropertiesMsg;
|
||||||
Message msg = unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
|
Message unmappedForgedPropertiesMsg;
|
||||||
Message.BEANMAPPING_UNMAPPED_TARGETS_ERROR : Message.BEANMAPPING_UNMAPPED_TARGETS_WARNING;
|
if ( unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ) {
|
||||||
Object[] args = new Object[] {
|
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_TARGETS_ERROR;
|
||||||
MessageFormat.format(
|
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR;
|
||||||
"{0,choice,1#property|1<properties}: \"{1}\"",
|
}
|
||||||
unprocessedTargetProperties.size(),
|
else {
|
||||||
Strings.join( unprocessedTargetProperties.keySet(), ", " )
|
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_TARGETS_WARNING;
|
||||||
)
|
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_WARNING;
|
||||||
};
|
}
|
||||||
|
|
||||||
ctx.getMessager().printMessage(
|
reportErrorForUnmappedProperties(
|
||||||
method.getExecutable(),
|
unprocessedTargetProperties,
|
||||||
msg,
|
unmappedPropertiesMsg,
|
||||||
args
|
unmappedForgedPropertiesMsg );
|
||||||
);
|
|
||||||
}
|
|
||||||
else if ( !ctx.isErroneous() ) {
|
|
||||||
Message msg = unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
|
|
||||||
Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR :
|
|
||||||
Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_WARNING;
|
|
||||||
String sourceErrorMessage = method.getParameters().get( 0 ).getType().describe();
|
|
||||||
String targetErrorMessage = method.getReturnType().describe();
|
|
||||||
if ( ( (ForgedMethod) method ).getHistory() != null ) {
|
|
||||||
ForgedMethodHistory history = ( (ForgedMethod) method ).getHistory();
|
|
||||||
sourceErrorMessage = history.createSourcePropertyErrorMessage();
|
|
||||||
targetErrorMessage = MessageFormat.format(
|
|
||||||
"\"{0} {1}\"",
|
|
||||||
history.getTargetType().describe(),
|
|
||||||
history.createTargetPropertyName()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Object[] args = new Object[] {
|
|
||||||
MessageFormat.format(
|
|
||||||
"{0,choice,1#property|1<properties}: \"{1}\"",
|
|
||||||
unprocessedTargetProperties.size(),
|
|
||||||
Strings.join( unprocessedTargetProperties.keySet(), ", " )
|
|
||||||
),
|
|
||||||
sourceErrorMessage,
|
|
||||||
targetErrorMessage
|
|
||||||
};
|
|
||||||
ctx.getMessager().printMessage(
|
|
||||||
method.getExecutable(),
|
|
||||||
msg,
|
|
||||||
args
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1782,22 +1750,67 @@ public class BeanMappingMethod extends NormalTypeMappingMethod {
|
|||||||
|
|
||||||
private void reportErrorForUnmappedSourcePropertiesIfRequired() {
|
private void reportErrorForUnmappedSourcePropertiesIfRequired() {
|
||||||
ReportingPolicyGem unmappedSourcePolicy = getUnmappedSourcePolicy();
|
ReportingPolicyGem unmappedSourcePolicy = getUnmappedSourcePolicy();
|
||||||
|
|
||||||
if ( !unprocessedSourceProperties.isEmpty() && unmappedSourcePolicy.requiresReport() ) {
|
if ( !unprocessedSourceProperties.isEmpty() && unmappedSourcePolicy.requiresReport() ) {
|
||||||
|
Message unmappedPropertiesMsg;
|
||||||
|
Message unmappedForgedPropertiesMsg;
|
||||||
|
if ( unmappedSourcePolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ) {
|
||||||
|
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_SOURCES_ERROR;
|
||||||
|
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_SOURCES_ERROR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_SOURCES_WARNING;
|
||||||
|
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_SOURCES_WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
Message msg = unmappedSourcePolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
|
reportErrorForUnmappedProperties(
|
||||||
Message.BEANMAPPING_UNMAPPED_SOURCES_ERROR : Message.BEANMAPPING_UNMAPPED_SOURCES_WARNING;
|
unprocessedSourceProperties,
|
||||||
|
unmappedPropertiesMsg,
|
||||||
|
unmappedForgedPropertiesMsg );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reportErrorForUnmappedProperties(Map<String, Accessor> unmappedProperties,
|
||||||
|
Message unmappedPropertiesMsg,
|
||||||
|
Message unmappedForgedPropertiesMsg) {
|
||||||
|
if ( !( method instanceof ForgedMethod ) ) {
|
||||||
Object[] args = new Object[] {
|
Object[] args = new Object[] {
|
||||||
MessageFormat.format(
|
MessageFormat.format(
|
||||||
"{0,choice,1#property|1<properties}: \"{1}\"",
|
"{0,choice,1#property|1<properties}: \"{1}\"",
|
||||||
unprocessedSourceProperties.size(),
|
unmappedProperties.size(),
|
||||||
Strings.join( unprocessedSourceProperties.keySet(), ", " )
|
Strings.join( unmappedProperties.keySet(), ", " )
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
ctx.getMessager().printMessage(
|
ctx.getMessager().printMessage(
|
||||||
method.getExecutable(),
|
method.getExecutable(),
|
||||||
msg,
|
unmappedPropertiesMsg,
|
||||||
|
args
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if ( !ctx.isErroneous() ) {
|
||||||
|
String sourceErrorMessage = method.getParameters().get( 0 ).getType().describe();
|
||||||
|
String targetErrorMessage = method.getReturnType().describe();
|
||||||
|
if ( ( (ForgedMethod) method ).getHistory() != null ) {
|
||||||
|
ForgedMethodHistory history = ( (ForgedMethod) method ).getHistory();
|
||||||
|
sourceErrorMessage = history.createSourcePropertyErrorMessage();
|
||||||
|
targetErrorMessage = MessageFormat.format(
|
||||||
|
"\"{0} {1}\"",
|
||||||
|
history.getTargetType().describe(),
|
||||||
|
history.createTargetPropertyName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Object[] args = new Object[] {
|
||||||
|
MessageFormat.format(
|
||||||
|
"{0,choice,1#property|1<properties}: \"{1}\"",
|
||||||
|
unmappedProperties.size(),
|
||||||
|
Strings.join( unmappedProperties.keySet(), ", " )
|
||||||
|
),
|
||||||
|
sourceErrorMessage,
|
||||||
|
targetErrorMessage
|
||||||
|
};
|
||||||
|
ctx.getMessager().printMessage(
|
||||||
|
method.getExecutable(),
|
||||||
|
unmappedForgedPropertiesMsg,
|
||||||
args
|
args
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,8 @@ public enum Message {
|
|||||||
BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR( "Unmapped target %s. Mapping from %s to %s." ),
|
BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR( "Unmapped target %s. Mapping from %s to %s." ),
|
||||||
BEANMAPPING_UNMAPPED_SOURCES_WARNING( "Unmapped source %s.", Diagnostic.Kind.WARNING ),
|
BEANMAPPING_UNMAPPED_SOURCES_WARNING( "Unmapped source %s.", Diagnostic.Kind.WARNING ),
|
||||||
BEANMAPPING_UNMAPPED_SOURCES_ERROR( "Unmapped source %s." ),
|
BEANMAPPING_UNMAPPED_SOURCES_ERROR( "Unmapped source %s." ),
|
||||||
|
BEANMAPPING_UNMAPPED_FORGED_SOURCES_WARNING( "Unmapped source %s. Mapping from %s to %s.", Diagnostic.Kind.WARNING ),
|
||||||
|
BEANMAPPING_UNMAPPED_FORGED_SOURCES_ERROR( "Unmapped source %s. Mapping from %s to %s." ),
|
||||||
BEANMAPPING_MISSING_IGNORED_SOURCES_ERROR( "Ignored unknown source %s." ),
|
BEANMAPPING_MISSING_IGNORED_SOURCES_ERROR( "Ignored unknown source %s." ),
|
||||||
BEANMAPPING_CYCLE_BETWEEN_PROPERTIES( "Cycle(s) between properties given via dependsOn(): %s." ),
|
BEANMAPPING_CYCLE_BETWEEN_PROPERTIES( "Cycle(s) between properties given via dependsOn(): %s." ),
|
||||||
BEANMAPPING_UNKNOWN_PROPERTY_IN_DEPENDS_ON( "\"%s\" is no property of the method return type." ),
|
BEANMAPPING_UNKNOWN_PROPERTY_IN_DEPENDS_ON( "\"%s\" is no property of the method return type." ),
|
||||||
|
@ -38,25 +38,38 @@ import org.mapstruct.ap.test.nestedbeans.unmappable.Wheel;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.WheelDto;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.WheelDto;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.Word;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.Word;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.WordDto;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.WordDto;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableCollectionElementPropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceCollectionElementPropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepListMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepListMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepMapKeyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepMapKeyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepMapValueMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepMapValueMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepNestingMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepNestingMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableEnumMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceEnumMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableValuePropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceValuePropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetCollectionElementPropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepListMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepMapKeyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepMapValueMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepNestingMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetValuePropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreCollectionElementPropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreCollectionElementPropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepListMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepListMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapKeyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapKeyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapValueMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapValueMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepNestingMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepNestingMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreValuePropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreValuePropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnCollectionElementPropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnCollectionElementPropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepListMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepListMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepMapKeyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepMapKeyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepMapValueMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepMapValueMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepNestingMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepNestingMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnValuePropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnValuePropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnCollectionElementPropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepListMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepMapKeyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepMapValueMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepNestingMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnValuePropertyMapper;
|
||||||
|
import org.mapstruct.ap.testutil.IssueKey;
|
||||||
import org.mapstruct.ap.testutil.ProcessorTest;
|
import org.mapstruct.ap.testutil.ProcessorTest;
|
||||||
import org.mapstruct.ap.testutil.WithClasses;
|
import org.mapstruct.ap.testutil.WithClasses;
|
||||||
import org.mapstruct.ap.testutil.compilation.annotation.CompilationResult;
|
import org.mapstruct.ap.testutil.compilation.annotation.CompilationResult;
|
||||||
@ -88,12 +101,12 @@ public class DottedErrorMessageTest {
|
|||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableDeepNestingMapper.class
|
UnmappableTargetDeepNestingMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableDeepNestingMapper.class,
|
@Diagnostic(type = UnmappableTargetDeepNestingMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
|
||||||
@ -101,17 +114,17 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testDeepNestedBeans() {
|
public void testTargetDeepNestedBeans() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableDeepListMapper.class
|
UnmappableTargetDeepListMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableDeepListMapper.class,
|
@Diagnostic(type = UnmappableTargetDeepListMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
|
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
|
||||||
@ -119,17 +132,17 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testIterables() {
|
public void testTargetIterables() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableDeepMapKeyMapper.class
|
UnmappableTargetDeepMapKeyMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableDeepMapKeyMapper.class,
|
@Diagnostic(type = UnmappableTargetDeepMapKeyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
|
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
|
||||||
@ -137,17 +150,17 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testMapKeys() {
|
public void testTargetMapKeys() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableDeepMapValueMapper.class
|
UnmappableTargetDeepMapValueMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableDeepMapValueMapper.class,
|
@Diagnostic(type = UnmappableTargetDeepMapValueMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
|
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
|
||||||
@ -155,17 +168,17 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testMapValues() {
|
public void testTargetMapValues() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableCollectionElementPropertyMapper.class
|
UnmappableTargetCollectionElementPropertyMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableCollectionElementPropertyMapper.class,
|
@Diagnostic(type = UnmappableTargetCollectionElementPropertyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
||||||
@ -173,17 +186,17 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testCollectionElementProperty() {
|
public void testTargetCollectionElementProperty() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableValuePropertyMapper.class
|
UnmappableTargetValuePropertyMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableValuePropertyMapper.class,
|
@Diagnostic(type = UnmappableTargetValuePropertyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 14,
|
line = 14,
|
||||||
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
||||||
@ -191,17 +204,131 @@ public class DottedErrorMessageTest {
|
|||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testMapValueProperty() {
|
public void testTargetMapValueProperty() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableEnumMapper.class
|
UnmappableSourceDeepNestingMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.FAILED,
|
value = CompilationResult.FAILED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableEnumMapper.class,
|
@Diagnostic(type = UnmappableSourceDeepNestingMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"cmyk\". Mapping from " + PROPERTY +
|
||||||
|
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceDeepNestedBeans() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceDeepListMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceDeepListMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"right\". Mapping from " + COLLECTION_ELEMENT +
|
||||||
|
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceIterables() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceDeepMapKeyMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceDeepMapKeyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_KEY +
|
||||||
|
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceMapKeys() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceDeepMapValueMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceDeepMapValueMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_VALUE +
|
||||||
|
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceMapValues() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceCollectionElementPropertyMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceCollectionElementPropertyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
|
||||||
|
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceCollectionElementProperty() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceValuePropertyMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceValuePropertyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
|
||||||
|
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testSourceMapValueProperty() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceEnumMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.FAILED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceEnumMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||||
line = 25,
|
line = 25,
|
||||||
message =
|
message =
|
||||||
@ -211,54 +338,54 @@ public class DottedErrorMessageTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
public void testMapEnumProperty() {
|
public void testSourceMapEnumProperty() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableWarnDeepNestingMapper.class,
|
UnmappableTargetWarnDeepNestingMapper.class,
|
||||||
UnmappableWarnDeepListMapper.class,
|
UnmappableTargetWarnDeepListMapper.class,
|
||||||
UnmappableWarnDeepMapKeyMapper.class,
|
UnmappableTargetWarnDeepMapKeyMapper.class,
|
||||||
UnmappableWarnDeepMapValueMapper.class,
|
UnmappableTargetWarnDeepMapValueMapper.class,
|
||||||
UnmappableWarnCollectionElementPropertyMapper.class,
|
UnmappableTargetWarnCollectionElementPropertyMapper.class,
|
||||||
UnmappableWarnValuePropertyMapper.class
|
UnmappableTargetWarnValuePropertyMapper.class
|
||||||
})
|
})
|
||||||
@ExpectedCompilationOutcome(
|
@ExpectedCompilationOutcome(
|
||||||
value = CompilationResult.SUCCEEDED,
|
value = CompilationResult.SUCCEEDED,
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@Diagnostic(type = UnmappableWarnDeepNestingMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnDeepNestingMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
|
||||||
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
|
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'."),
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'."),
|
||||||
@Diagnostic(type = UnmappableWarnDeepListMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnDeepListMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
|
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
|
||||||
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
|
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'."),
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'."),
|
||||||
@Diagnostic(type = UnmappableWarnDeepMapKeyMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnDeepMapKeyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
|
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
|
||||||
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
|
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'."),
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'."),
|
||||||
@Diagnostic(type = UnmappableWarnDeepMapValueMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnDeepMapValueMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
|
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
|
||||||
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
|
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'."),
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'."),
|
||||||
@Diagnostic(type = UnmappableWarnCollectionElementPropertyMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnCollectionElementPropertyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
||||||
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
|
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'."),
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'."),
|
||||||
@Diagnostic(type = UnmappableWarnValuePropertyMapper.class,
|
@Diagnostic(type = UnmappableTargetWarnValuePropertyMapper.class,
|
||||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
line = 13,
|
line = 16,
|
||||||
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
|
||||||
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
|
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
|
||||||
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
||||||
@ -267,6 +394,60 @@ public class DottedErrorMessageTest {
|
|||||||
public void testWarnUnmappedTargetProperties() {
|
public void testWarnUnmappedTargetProperties() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IssueKey( "2788" )
|
||||||
|
@ProcessorTest
|
||||||
|
@WithClasses({
|
||||||
|
UnmappableSourceWarnDeepNestingMapper.class,
|
||||||
|
UnmappableSourceWarnDeepListMapper.class,
|
||||||
|
UnmappableSourceWarnDeepMapKeyMapper.class,
|
||||||
|
UnmappableSourceWarnDeepMapValueMapper.class,
|
||||||
|
UnmappableSourceWarnCollectionElementPropertyMapper.class,
|
||||||
|
UnmappableSourceWarnValuePropertyMapper.class
|
||||||
|
})
|
||||||
|
@ExpectedCompilationOutcome(
|
||||||
|
value = CompilationResult.SUCCEEDED,
|
||||||
|
diagnostics = {
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnDeepNestingMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"cmyk\". Mapping from " + PROPERTY +
|
||||||
|
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'."),
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnDeepListMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"right\". Mapping from " + COLLECTION_ELEMENT +
|
||||||
|
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'."),
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnDeepMapKeyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_KEY +
|
||||||
|
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'."),
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnDeepMapValueMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_VALUE +
|
||||||
|
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'."),
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnCollectionElementPropertyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
|
||||||
|
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'."),
|
||||||
|
@Diagnostic(type = UnmappableSourceWarnValuePropertyMapper.class,
|
||||||
|
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||||
|
line = 16,
|
||||||
|
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
|
||||||
|
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
|
||||||
|
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
public void testWarnUnmappedSourceProperties() {
|
||||||
|
}
|
||||||
|
|
||||||
@ProcessorTest
|
@ProcessorTest
|
||||||
@WithClasses({
|
@WithClasses({
|
||||||
UnmappableIgnoreDeepNestingMapper.class,
|
UnmappableIgnoreDeepNestingMapper.class,
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceDeepListMapper extends BaseDeepListMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceDeepMapValueMapper extends BaseDeepMapValueMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceDeepNestingMapper extends BaseDeepNestingMapper {
|
||||||
|
}
|
@ -20,7 +20,7 @@ import org.mapstruct.ap.test.nestedbeans.unmappable.User;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.UserDto;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.UserDto;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public abstract class UnmappableEnumMapper {
|
public abstract class UnmappableSourceEnumMapper {
|
||||||
|
|
||||||
abstract UserDto userToUserDto(User user);
|
abstract UserDto userToUserDto(User user);
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.ERROR;
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
|
||||||
|
public abstract class UnmappableSourceValuePropertyMapper extends BaseValuePropertyMapper {
|
||||||
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
public abstract class UnmappableTargetCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
||||||
}
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableDeepListMapper extends BaseDeepListMapper {
|
public abstract class UnmappableTargetDeepListMapper extends BaseDeepListMapper {
|
||||||
}
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
public abstract class UnmappableTargetDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
||||||
}
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableDeepMapValueMapper extends BaseDeepMapValueMapper {
|
public abstract class UnmappableTargetDeepMapValueMapper extends BaseDeepMapValueMapper {
|
||||||
}
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableDeepNestingMapper extends BaseDeepNestingMapper {
|
public abstract class UnmappableTargetDeepNestingMapper extends BaseDeepNestingMapper {
|
||||||
}
|
}
|
@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
|
|||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
|
||||||
public abstract class UnmappableValuePropertyMapper extends BaseValuePropertyMapper {
|
public abstract class UnmappableTargetValuePropertyMapper extends BaseValuePropertyMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
public abstract class UnmappableSourceWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnDeepListMapper extends BaseDeepListMapper {
|
public abstract class UnmappableSourceWarnDeepListMapper extends BaseDeepListMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
public abstract class UnmappableSourceWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
|
public abstract class UnmappableSourceWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnDeepNestingMapper extends BaseDeepNestingMapper {
|
public abstract class UnmappableSourceWarnDeepNestingMapper extends BaseDeepNestingMapper {
|
||||||
}
|
}
|
@ -5,10 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
||||||
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
@Mapper(uses = RoofTypeMapper.class)
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
|
||||||
public abstract class UnmappableWarnValuePropertyMapper extends BaseValuePropertyMapper {
|
public abstract class UnmappableSourceWarnValuePropertyMapper extends BaseValuePropertyMapper {
|
||||||
}
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnDeepListMapper extends BaseDeepListMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnDeepNestingMapper extends BaseDeepNestingMapper {
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Copyright MapStruct Authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*/
|
||||||
|
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
|
||||||
|
|
||||||
|
import static org.mapstruct.ReportingPolicy.IGNORE;
|
||||||
|
import static org.mapstruct.ReportingPolicy.WARN;
|
||||||
|
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
|
||||||
|
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
|
||||||
|
|
||||||
|
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
|
||||||
|
public abstract class UnmappableTargetWarnValuePropertyMapper extends BaseValuePropertyMapper {
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user