diff options
author | jfrijters <jfrijters> | 2008-02-18 11:01:05 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2008-02-18 11:01:05 +0300 |
commit | 21f836bf809f033515d29854a6a95b5886ba5138 (patch) | |
tree | 706cf5fa9173f1744ae8b3836adb1ccca1492c4e /openjdk/map.xml | |
parent | dab108cc67bf385e9f79fd547ade94359f95d641 (diff) |
Made java.util.AbstractMap enumerable and added Add() method to support C# 3.0 collection initialization syntax.
Diffstat (limited to 'openjdk/map.xml')
-rw-r--r-- | openjdk/map.xml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/openjdk/map.xml b/openjdk/map.xml index 11ce785e..a33aa184 100644 --- a/openjdk/map.xml +++ b/openjdk/map.xml @@ -1385,6 +1385,35 @@ </body> </method> </class> + <class name="java.util.AbstractMap"> + <!-- NOTE the compiler will not magically make all Maps enumerable, so we manually implement IEnumerable here --> + <implements class="cli.System.Collections.IEnumerable" /> + <method name="System.Collections.IEnumerable.GetEnumerator" sig="()Lcli.System.Collections.IEnumerator;" modifiers="private" attributes="NewSlot Virtual Final"> + <override class="cli.System.Collections.IEnumerable" name="GetEnumerator" /> + <attribute type="IKVM.Attributes.HideFromJavaAttribute" sig="()V" /> + <body> + <ldarg_0 /> + <newobj class="ikvm.lang.MapEnumerator" name="<init>" sig="(Ljava.util.Map;)V" /> + <ret /> + </body> + </method> + <!-- We're adding an Add(object,object) method to allow collection initializers to magically work --> + <!-- NOTE Modifiers.Final and MethodAttributes.NewSlot is recognized by AotTypeWrapper.MapModifiers() as a magic combination that generates a non-virtual method --> + <method name="Add" sig="(Ljava.lang.Object;Ljava.lang.Object;)V" modifiers="public final" attributes="NewSlot"> + <attribute type="IKVM.Attributes.HideFromJavaAttribute" sig="()V" /> + <attribute type="System.ComponentModel.EditorBrowsableAttribute" sig="(Lcli.System.ComponentModel.EditorBrowsableState;)V"> + <parameter>Never</parameter> + </attribute> + <body> + <ldarg_0 /> + <ldarg_1 /> + <ldarg_2 /> + <callvirt class="java.util.AbstractMap" name="put" sig="(Ljava.lang.Object;Ljava.lang.Object;)Ljava.lang.Object;" /> + <pop /> + <ret /> + </body> + </method> + </class> <class name="java.util.concurrent.locks.AbstractQueuedSynchronizer"> <method name="compareAndSetState" sig="(II)Z"> <body> |