mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
parent
7af107c9f2
commit
3868735da7
@ -15,7 +15,6 @@ import javax.lang.model.element.Modifier;
|
|||||||
import javax.lang.model.util.Types;
|
import javax.lang.model.util.Types;
|
||||||
|
|
||||||
import org.mapstruct.ap.internal.model.common.Accessibility;
|
import org.mapstruct.ap.internal.model.common.Accessibility;
|
||||||
import org.mapstruct.ap.internal.model.common.BuilderType;
|
|
||||||
import org.mapstruct.ap.internal.model.common.Parameter;
|
import org.mapstruct.ap.internal.model.common.Parameter;
|
||||||
import org.mapstruct.ap.internal.model.common.Type;
|
import org.mapstruct.ap.internal.model.common.Type;
|
||||||
import org.mapstruct.ap.internal.model.common.TypeFactory;
|
import org.mapstruct.ap.internal.model.common.TypeFactory;
|
||||||
@ -77,7 +76,6 @@ public class SourceMethod implements Method {
|
|||||||
private ExecutableElement executable;
|
private ExecutableElement executable;
|
||||||
private List<Parameter> parameters;
|
private List<Parameter> parameters;
|
||||||
private Type returnType = null;
|
private Type returnType = null;
|
||||||
private BuilderType builderType = null;
|
|
||||||
private List<Type> exceptionTypes;
|
private List<Type> exceptionTypes;
|
||||||
private Set<Mapping> mappings;
|
private Set<Mapping> mappings;
|
||||||
private IterableMapping iterableMapping = null;
|
private IterableMapping iterableMapping = null;
|
||||||
@ -290,12 +288,6 @@ public class SourceMethod implements Method {
|
|||||||
&& getResultType().isAssignableTo( first( method.getSourceParameters() ).getType() );
|
&& getResultType().isAssignableTo( first( method.getSourceParameters() ).getType() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSame(SourceMethod method) {
|
|
||||||
return getSourceParameters().size() == 1 && method.getSourceParameters().size() == 1
|
|
||||||
&& equals( first( getSourceParameters() ).getType(), first( method.getSourceParameters() ).getType() )
|
|
||||||
&& equals( getResultType(), method.getResultType() );
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canInheritFrom(SourceMethod method) {
|
public boolean canInheritFrom(SourceMethod method) {
|
||||||
return method.getDeclaringMapper() == null
|
return method.getDeclaringMapper() == null
|
||||||
&& method.isAbstract()
|
&& method.isAbstract()
|
||||||
@ -373,10 +365,6 @@ public class SourceMethod implements Method {
|
|||||||
return isValueMapping;
|
return isValueMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean equals(Object o1, Object o2) {
|
|
||||||
return (o1 == null && o2 == null) || (o1 != null) && o1.equals( o2 );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder( returnType.toString() );
|
StringBuilder sb = new StringBuilder( returnType.toString() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user