Revision 55a9b086
Added by Andreas Müller about 11 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/match/DefaultMatchStrategy.java | ||
---|---|---|
13 | 13 |
import java.lang.annotation.Annotation; |
14 | 14 |
import java.lang.reflect.Field; |
15 | 15 |
import java.lang.reflect.GenericDeclaration; |
16 |
import java.lang.reflect.ParameterizedType; |
|
16 | 17 |
import java.lang.reflect.Type; |
18 |
import java.lang.reflect.TypeVariable; |
|
17 | 19 |
import java.net.URI; |
18 | 20 |
import java.util.ArrayList; |
19 | 21 |
import java.util.Collection; |
... | ... | |
25 | 27 |
|
26 | 28 |
import org.apache.log4j.Logger; |
27 | 29 |
|
28 |
import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl; |
|
29 |
import sun.reflect.generics.reflectiveObjects.TypeVariableImpl; |
|
30 | 30 |
import eu.etaxonomy.cdm.common.CdmUtils; |
31 | 31 |
import eu.etaxonomy.cdm.common.DoubleResult; |
32 | 32 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
... | ... | |
367 | 367 |
} |
368 | 368 |
|
369 | 369 |
private Class getTypeOfSet(Field field) throws MatchException{ |
370 |
Type genericType = (ParameterizedTypeImpl)field.getGenericType();
|
|
371 |
if (genericType instanceof ParameterizedTypeImpl){
|
|
372 |
ParameterizedTypeImpl paraType = (ParameterizedTypeImpl)genericType;
|
|
370 |
Type genericType = (ParameterizedType)field.getGenericType(); |
|
371 |
if (genericType instanceof ParameterizedType/*Impl*/){
|
|
372 |
ParameterizedType paraType = (ParameterizedType)genericType;
|
|
373 | 373 |
paraType.getRawType(); |
374 | 374 |
Type[] arguments = paraType.getActualTypeArguments(); |
375 | 375 |
if (arguments.length == 1){ |
... | ... | |
377 | 377 |
try { |
378 | 378 |
if (arguments[0] instanceof Class){ |
379 | 379 |
return (Class)arguments[0]; |
380 |
}else if(arguments[0] instanceof TypeVariableImpl){
|
|
381 |
TypeVariableImpl typeVariable = (TypeVariableImpl)arguments[0];
|
|
380 |
}else if(arguments[0] instanceof TypeVariable/*Impl*/){
|
|
381 |
TypeVariable typeVariable = (TypeVariable)arguments[0];
|
|
382 | 382 |
GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration(); |
383 | 383 |
return (Class)genericDeclaration; |
384 | 384 |
}else{ |
Also available in: Unified diff
Remove not public classes in merge and match strategies