mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#178 adapt javadoc of SimpleConversion and remove getters for exception types
This commit is contained in:
parent
c051741824
commit
9bc62a5116
@ -19,7 +19,6 @@
|
||||
package org.mapstruct.ap.conversion;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.mapstruct.ap.model.TypeConversion;
|
||||
@ -27,8 +26,7 @@ import org.mapstruct.ap.model.common.ConversionContext;
|
||||
import org.mapstruct.ap.model.common.Type;
|
||||
|
||||
/**
|
||||
* Base class for {@link ConversionProvider}s creating {@link TypeConversion}s
|
||||
* which don't require any type imports nor declare any exception types.
|
||||
* Base class for {@link ConversionProvider}s creating {@link TypeConversion}s which don't declare any exception types.
|
||||
*
|
||||
* @author Gunnar Morling
|
||||
*/
|
||||
@ -38,7 +36,7 @@ public abstract class SimpleConversion implements ConversionProvider {
|
||||
public TypeConversion to(String sourceReference, ConversionContext conversionContext) {
|
||||
return new TypeConversion(
|
||||
getToConversionImportTypes( conversionContext ),
|
||||
getToConversionExceptionTypes( conversionContext ),
|
||||
Collections.<Type> emptyList(),
|
||||
getToConversionString( sourceReference, conversionContext )
|
||||
);
|
||||
}
|
||||
@ -47,19 +45,11 @@ public abstract class SimpleConversion implements ConversionProvider {
|
||||
public TypeConversion from(String targetReference, ConversionContext conversionContext) {
|
||||
return new TypeConversion(
|
||||
getFromConversionImportTypes( conversionContext ),
|
||||
getFromConversionExceptionTypes( conversionContext ),
|
||||
Collections.<Type> emptyList(),
|
||||
getFromConversionString( targetReference, conversionContext )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param conversionContext the conversion context
|
||||
* @return exception types required in the from-conversion
|
||||
*/
|
||||
protected List<Type> getFromConversionExceptionTypes(ConversionContext conversionContext) {
|
||||
return Collections.<Type> emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param conversionContext the conversion context
|
||||
* @return conversion types required in the from-conversion
|
||||
@ -68,14 +58,6 @@ public abstract class SimpleConversion implements ConversionProvider {
|
||||
return Collections.<Type> emptySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param conversionContext the conversion context
|
||||
* @return exception types required in the to-conversion
|
||||
*/
|
||||
protected List<Type> getToConversionExceptionTypes(ConversionContext conversionContext) {
|
||||
return Collections.<Type> emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param conversionContext the conversion context
|
||||
* @return conversion types required in the to-conversion
|
||||
|
Loading…
x
Reference in New Issue
Block a user