: super(declaringType, genericMethodDefinition.Name) { this.typeSystem = typeSystem; this.genericMethodDefinition = genericMethodDefinition; this.genericArguments = genericArguments; this.genericsScope = new GenericParameterBindings(genericsScope); }
private void initialize() { if (returnType != null) { return; } if (genericArguments == null) { genericArguments = ReflectionHelper.bindGenericParameters(typeSystem, genericsScope, genericMethodDefinition.GenericArguments); } else { ReflectionHelper.declareGenericTypeBindings(genericsScope, genericMethodDefinition.GenericArguments, genericArguments); } returnType = ReflectionHelper.bindGenericParameters(typeSystem, genericsScope, genericMethodDefinition.ReturnType); parameters = new ArrayList<ParameterInfo>(); foreach (var p in genericMethodDefinition.Parameters) { var newp = new ParameterInfo(p.Position, ReflectionHelper.bindGenericParameters(typeSystem, genericsScope, p.Type)); newp.name = p.Name; parameters.add(newp); } exceptions = ReflectionHelper.bindGenericParameters(typeSystem, genericsScope, genericMethodDefinition.Exceptions); genericsScope = null; }
ConstructedGenericMethod(Library typeSystem, TypeInfo declaringType, MethodInfo genericMethodDefinition, Iterable<TypeInfo> genericArguments, GenericParameterBindings genericsScope) : super(declaringType, genericMethodDefinition.Name) {