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;
|
package org.mapstruct.ap.conversion;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.mapstruct.ap.model.TypeConversion;
|
import org.mapstruct.ap.model.TypeConversion;
|
||||||
@ -27,8 +26,7 @@ import org.mapstruct.ap.model.common.ConversionContext;
|
|||||||
import org.mapstruct.ap.model.common.Type;
|
import org.mapstruct.ap.model.common.Type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for {@link ConversionProvider}s creating {@link TypeConversion}s
|
* Base class for {@link ConversionProvider}s creating {@link TypeConversion}s which don't declare any exception types.
|
||||||
* which don't require any type imports nor declare any exception types.
|
|
||||||
*
|
*
|
||||||
* @author Gunnar Morling
|
* @author Gunnar Morling
|
||||||
*/
|
*/
|
||||||
@ -38,7 +36,7 @@ public abstract class SimpleConversion implements ConversionProvider {
|
|||||||
public TypeConversion to(String sourceReference, ConversionContext conversionContext) {
|
public TypeConversion to(String sourceReference, ConversionContext conversionContext) {
|
||||||
return new TypeConversion(
|
return new TypeConversion(
|
||||||
getToConversionImportTypes( conversionContext ),
|
getToConversionImportTypes( conversionContext ),
|
||||||
getToConversionExceptionTypes( conversionContext ),
|
Collections.<Type> emptyList(),
|
||||||
getToConversionString( sourceReference, conversionContext )
|
getToConversionString( sourceReference, conversionContext )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -47,19 +45,11 @@ public abstract class SimpleConversion implements ConversionProvider {
|
|||||||
public TypeConversion from(String targetReference, ConversionContext conversionContext) {
|
public TypeConversion from(String targetReference, ConversionContext conversionContext) {
|
||||||
return new TypeConversion(
|
return new TypeConversion(
|
||||||
getFromConversionImportTypes( conversionContext ),
|
getFromConversionImportTypes( conversionContext ),
|
||||||
getFromConversionExceptionTypes( conversionContext ),
|
Collections.<Type> emptyList(),
|
||||||
getFromConversionString( targetReference, conversionContext )
|
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
|
* @param conversionContext the conversion context
|
||||||
* @return conversion types required in the from-conversion
|
* @return conversion types required in the from-conversion
|
||||||
@ -68,14 +58,6 @@ public abstract class SimpleConversion implements ConversionProvider {
|
|||||||
return Collections.<Type> emptySet();
|
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
|
* @param conversionContext the conversion context
|
||||||
* @return conversion types required in the to-conversion
|
* @return conversion types required in the to-conversion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user