Skip to content

Commit 1c623c2

Browse files
Document TypeDescriptor method operations (#552)
* Document TypeDescriptor method operations Refs #201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Clarify TypeDescriptor insertion boundary Refs #201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add TypeDescriptor source attribution Refs #201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix TypeDescriptor source attribution Refs #201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent e42901b commit 1c623c2

1 file changed

Lines changed: 106 additions & 29 deletions

File tree

docs/xml/Java.Lang.Invoke/ITypeDescriptor+IOfMethod.xml

Lines changed: 106 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,22 @@
8181
<Parameter Name="paramType" Type="Java.Lang.Object" />
8282
</Parameters>
8383
<Docs>
84-
<param name="index">To be added.</param>
85-
<param name="paramType">To be added.</param>
86-
<summary>To be added.</summary>
87-
<returns>To be added.</returns>
88-
<remarks>To be added.</remarks>
84+
<param name="index">The zero-based index of the parameter to change.</param>
85+
<param name="paramType">The field descriptor for the replacement parameter type.</param>
86+
<summary>Creates a method descriptor with one parameter type replaced.</summary>
87+
<returns>A method descriptor that differs only at the specified parameter index.</returns>
88+
<remarks>
89+
<para>The returned descriptor is identical to this descriptor except that the parameter at <paramref name="index" /> uses <paramref name="paramType" />.</para>
90+
<para>
91+
<format type="text/html">
92+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#changeParameterType(int,%20F)" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.changeParameterType(int, F)</code>.</a>
93+
</format>
94+
</para>
95+
<para>Portions of this page are modifications based on work created and shared by the
96+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
97+
and used according to terms described in the
98+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
99+
</remarks>
89100
</Docs>
90101
</Member>
91102
<Member MemberName="ChangeReturnType">
@@ -115,10 +126,21 @@
115126
<Parameter Name="newReturn" Type="Java.Lang.Object" />
116127
</Parameters>
117128
<Docs>
118-
<param name="newReturn">To be added.</param>
119-
<summary>To be added.</summary>
120-
<returns>To be added.</returns>
121-
<remarks>To be added.</remarks>
129+
<param name="newReturn">The field descriptor for the replacement return type.</param>
130+
<summary>Creates a method descriptor with a different return type.</summary>
131+
<returns>A method descriptor that differs only in its return type.</returns>
132+
<remarks>
133+
<para>The returned descriptor has the same parameter types as this descriptor and uses <paramref name="newReturn" /> as its return type.</para>
134+
<para>
135+
<format type="text/html">
136+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#changeReturnType(F)" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.changeReturnType(F)</code>.</a>
137+
</format>
138+
</para>
139+
<para>Portions of this page are modifications based on work created and shared by the
140+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
141+
and used according to terms described in the
142+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
143+
</remarks>
122144
</Docs>
123145
</Member>
124146
<Member MemberName="DropParameterTypes">
@@ -149,11 +171,22 @@
149171
<Parameter Name="end" Type="System.Int32" />
150172
</Parameters>
151173
<Docs>
152-
<param name="start">To be added.</param>
153-
<param name="end">To be added.</param>
154-
<summary>To be added.</summary>
155-
<returns>To be added.</returns>
156-
<remarks>To be added.</remarks>
174+
<param name="start">The zero-based index of the first parameter to remove.</param>
175+
<param name="end">The index immediately after the last parameter to remove.</param>
176+
<summary>Creates a method descriptor with a range of parameter types removed.</summary>
177+
<returns>A method descriptor without the parameter types in the specified range.</returns>
178+
<remarks>
179+
<para>The removed range starts at <paramref name="start" /> and excludes <paramref name="end" />.</para>
180+
<para>
181+
<format type="text/html">
182+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#dropParameterTypes(int,%20int)" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.dropParameterTypes(int, int)</code>.</a>
183+
</format>
184+
</para>
185+
<para>Portions of this page are modifications based on work created and shared by the
186+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
187+
and used according to terms described in the
188+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
189+
</remarks>
157190
</Docs>
158191
</Member>
159192
<Member MemberName="InsertParameterTypes">
@@ -195,11 +228,22 @@
195228
</Parameter>
196229
</Parameters>
197230
<Docs>
198-
<param name="pos">To be added.</param>
199-
<param name="paramTypes">To be added.</param>
200-
<summary>To be added.</summary>
201-
<returns>To be added.</returns>
202-
<remarks>To be added.</remarks>
231+
<param name="pos">The zero-based position at which the first parameter type is inserted.</param>
232+
<param name="paramTypes">Field descriptors for the parameter types to insert.</param>
233+
<summary>Creates a method descriptor with additional parameter types.</summary>
234+
<returns>A method descriptor with the supplied parameter types inserted at the specified position.</returns>
235+
<remarks>
236+
<para>Insertion starts at <paramref name="pos" />. When <paramref name="pos" /> equals <c>ParameterCount()</c>, the supplied field descriptors are appended because no parameter exists at that position.</para>
237+
<para>
238+
<format type="text/html">
239+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#insertParameterTypes(int,%20F%5B%5D)" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.insertParameterTypes(int, F[])</code>.</a>
240+
</format>
241+
</para>
242+
<para>Portions of this page are modifications based on work created and shared by the
243+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
244+
and used according to terms described in the
245+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
246+
</remarks>
203247
</Docs>
204248
</Member>
205249
<Member MemberName="ParameterArray">
@@ -233,9 +277,20 @@
233277
</ReturnValue>
234278
<Parameters />
235279
<Docs>
236-
<summary>To be added.</summary>
237-
<returns>To be added.</returns>
238-
<remarks>To be added.</remarks>
280+
<summary>Returns the field descriptors for this descriptor's parameter types.</summary>
281+
<returns>An array of field descriptors for the parameter types.</returns>
282+
<remarks>
283+
<para>The returned array describes the parameter types in declaration order.</para>
284+
<para>
285+
<format type="text/html">
286+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#parameterArray()" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.parameterArray()</code>.</a>
287+
</format>
288+
</para>
289+
<para>Portions of this page are modifications based on work created and shared by the
290+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
291+
and used according to terms described in the
292+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
293+
</remarks>
239294
</Docs>
240295
</Member>
241296
<Member MemberName="ParameterCount">
@@ -351,10 +406,21 @@
351406
<Parameter Name="i" Type="System.Int32" />
352407
</Parameters>
353408
<Docs>
354-
<param name="i">To be added.</param>
355-
<summary>To be added.</summary>
356-
<returns>To be added.</returns>
357-
<remarks>To be added.</remarks>
409+
<param name="i">The zero-based index of the parameter.</param>
410+
<summary>Returns the field descriptor for a parameter type.</summary>
411+
<returns>The field descriptor for the parameter at the specified index.</returns>
412+
<remarks>
413+
<para>The returned descriptor describes the parameter at <paramref name="i" />.</para>
414+
<para>
415+
<format type="text/html">
416+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#parameterType(int)" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.parameterType(int)</code>.</a>
417+
</format>
418+
</para>
419+
<para>Portions of this page are modifications based on work created and shared by the
420+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
421+
and used according to terms described in the
422+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
423+
</remarks>
358424
</Docs>
359425
</Member>
360426
<Member MemberName="ReturnType">
@@ -382,9 +448,20 @@
382448
</ReturnValue>
383449
<Parameters />
384450
<Docs>
385-
<summary>To be added.</summary>
386-
<returns>To be added.</returns>
387-
<remarks>To be added.</remarks>
451+
<summary>Returns the field descriptor for this descriptor's return type.</summary>
452+
<returns>The field descriptor describing the return type.</returns>
453+
<remarks>
454+
<para>The returned descriptor represents this method descriptor's return type.</para>
455+
<para>
456+
<format type="text/html">
457+
<a href="https://developer.android.com/reference/java/lang/invoke/TypeDescriptor.OfMethod#returnType()" title="Reference documentation">Java documentation for <code>java.lang.invoke.TypeDescriptor.OfMethod.returnType()</code>.</a>
458+
</format>
459+
</para>
460+
<para>Portions of this page are modifications based on work created and shared by the
461+
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
462+
and used according to terms described in the
463+
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
464+
</remarks>
388465
</Docs>
389466
</Member>
390467
</Members>

0 commit comments

Comments
 (0)