method
);
return false;
}
Type parameterType = sourceParameters.get( 0 ).getType();
if ( parameterType.isIterableType() && !resultType.isIterableType() ) {
messager.printMessage(
Kind.ERROR,
"Can't generate mapping method from iterable type to non-iterable type.",
method
);
return false;
}
if ( containsTargetTypeParameter ) {
messager.printMessage(
Kind.ERROR,
"Can't generate mapping method that has a parameter annotated with @TargetType.",
method
);
return false;
}
if ( !parameterType.isIterableType() && resultType.isIterableType() ) {
messager.printMessage(
Kind.ERROR,
"Can't generate mapping method from non-iterable type to iterable type.",
method
);
return false;
}
if ( parameterType.isPrimitive() ) {
messager.printMessage( Kind.ERROR, "Can't generate mapping method with primitive parameter type.", method );
return false;
}
if ( resultType.isPrimitive() ) {
messager.printMessage( Kind.ERROR, "Can't generate mapping method with primitive return type.", method );
return false;
}
if ( parameterType.isEnumType() && !resultType.isEnumType() ) {
messager.printMessage(
Kind.ERROR,
"Can't generate mapping method from enum type to non-enum type.",
method
);
return false;
}
if ( !parameterType.isEnumType() && resultType.isEnumType() ) {
messager.printMessage(
Kind.ERROR,
"Can't generate mapping method from non-enum type to enum type.",
method
);