コード例 #1
0
ファイル: JavaResolverUtils.java プロジェクト: rlugojr/kotlin
 public static Map<TypeParameterDescriptor, TypeParameterDescriptorImpl>
     recreateTypeParametersAndReturnMapping(
         @NotNull List<TypeParameterDescriptor> originalParameters,
         @Nullable DeclarationDescriptor newOwner) {
   // LinkedHashMap to save the order of type parameters
   Map<TypeParameterDescriptor, TypeParameterDescriptorImpl> result =
       new LinkedHashMap<TypeParameterDescriptor, TypeParameterDescriptorImpl>();
   for (TypeParameterDescriptor typeParameter : originalParameters) {
     result.put(
         typeParameter,
         TypeParameterDescriptorImpl.createForFurtherModification(
             newOwner == null ? typeParameter.getContainingDeclaration() : newOwner,
             typeParameter.getAnnotations(),
             typeParameter.isReified(),
             typeParameter.getVariance(),
             typeParameter.getName(),
             typeParameter.getIndex(),
             SourceElement.NO_SOURCE));
   }
   return result;
 }