Commit 51f7862
committed
[Java.Interop] Purge "Wrapper" from naming.
We need consistent naming, which brings us to the current naming
dictionary:
https://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/#Cross-VM_Object_Collections
Changing certain names to be consistent with Java.Interop, we have:
> There are three categories of object types.
>
> * **Managed objects**: types which do not inherit from `JavaObject`,
> e.g. `System.String`. These are collected normally by the GC.
>
> * **Java objects**: Java types which are present within the [Java] VM
> but not exposed to the Mono VM.
>
> * **Peer objects**: types which implement `IJavaPeerable`, e.g. all
> `JavaObject` and `JavaException` subclasses. Instances of these
> types have two "halfs" a *managed peer* and a *native peer*.
> The managed peer is an instance of the managed type.
> The native peer is an instance of a Java class within the Java VM,
> and the managed `IJavaPeerable.PeerReference` property contains a
> JNI global reference to the native peer.
>
> There are two types of native peers:
>
> * **Framework peers**: "Normal" Java types which know nothing of
> Java.Interop, e.g. java.lang.String.
> * **User peers**: Java Callable Wrappers which exist for each
> `JavaObject` subclass present within the app.
Notice a word "missing" from that terminology description? "Wrapper".
The problem with "wrapper" is that it implies something is being
"wrapped", which *is not the case* with User Peers; the "wrapper"
would be the corresponding Java instance, the *User peer*, but it's
not a wrapper, so using "Wrapper" is misleading.
Instead, Xamarin.Android uses the term "Peer" ~fairly consistently,
and Java.Interop has been following suite in some areas, e.g.
IJava**Peer**able.**Peer**Reference. ;-)
Replace all instances of "Wrapper" within Java.Interop.dll and replace
with "Peer":
* JniRuntime.JniValueManager.CreateWrapper() is now
JniRuntime.JniValueManager.CreatePeer().
* JniTypeSignature.GetPrimitiveWrapper() is now
JniTypeSignature.GetPrimitivePeerTypeSignature().
* JniTypeSignatureAttribute.GenerateJavaWrapper is now
JniTypeSignatureAttribute.GenerateJavaPeer.1 parent 4e3cae4 commit 51f7862
File tree
4 files changed
+12
-12
lines changed- src/Java.Interop/Java.Interop
4 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
0 commit comments