private Class<?> defineStructure(Field destination,Field source){
  Class<?> destinationClass=destination.getType();
  Class<?> sourceClass=source.getType();
  Class<?> result=null;
  if (destinationClass.isInterface())   if (sourceClass.isInterface())   result=(Class<?>)implementationClass.get(destinationClass.getName());
 else {
    Class<?> sourceInterface=sourceClass.getInterfaces()[0];
    if (destinationClass == sourceInterface)     result=sourceClass;
 else     result=(Class<?>)implementationClass.get(destinationClass.getName());
  }
 else   result=destinationClass;
  return result;
}

private Class < ? > defineStructure ( Field destination , Field source ) { Class < ? > destinationClass = destination . getType ( ) ; Class < ? > sourceClass = source . getType ( ) ; Class < ? > result = null ; if ( destinationClass . isInterface ( ) ) if ( sourceClass . isInterface ( ) ) result = ( Class < ? > ) implementationClass . get ( destinationClass . getName ( ) ) ; else { Class < ? > sourceInterface = sourceClass . getInterfaces ( ) [ 0 ] ; if ( destinationClass == sourceInterface ) result = sourceClass ; else result = ( Class < ? > ) implementationClass . get ( destinationClass . getName ( ) ) ; } else result = destinationClass ; return result ; }
this method defines the destination structure for this operation . if destination class is an interface , a relative implementation will be found .
