XElement GetTypeParmeters (TypeParameterInfoCollection typeParameters)
		{
			if (typeParameters == null || typeParameters.Count == 0)
				return null;
			return new XElement ("typeParameters",
					typeParameters.Select (tp =>
						new XElement ("typeParameter",
							new XAttribute ("name",             tp.Identifier),
							new XAttribute ("jni-classBound",   tp.ClassBound ?? ""),
							new XAttribute ("classBound",       SignatureToGenericJavaTypeName (tp.ClassBound)),
							new XAttribute ("interfaceBounds",  string.Join (":", tp.InterfaceBounds.Select (_ => SignatureToGenericJavaTypeName (_)))),
							new XAttribute ("jni-interfaceBounds",  string.Join (":", tp.InterfaceBounds)))));
		}
예제 #2
0
        public override string ToString()
        {
            var sb = new StringBuilder("ClassSignature");

            if (TypeParameters.Count > 0)
            {
                sb.Append("<").Append(string.Join(", ", TypeParameters.Select(t => t.ToString()))).Append(">");
            }
            sb.Append("(").Append("Superclass=").Append(SuperclassSignature);
            if (SuperinterfaceSignatures.Count > 0)
            {
                sb.Append(", Superinterfaces(")
                .Append(string.Join(", ", SuperinterfaceSignatures))
                .Append(")");
            }
            sb.Append(")");
            return(sb.ToString());
        }