From 95ea777647f7db06659a1207ef4ee23b89793b34 Mon Sep 17 00:00:00 2001 From: masesdevelopers <94312179+masesdevelopers@users.noreply.github.com> Date: Mon, 3 Jun 2024 03:56:35 +0000 Subject: [PATCH] Update generated classes after commit 5021883 --- .../Generated/Android/Net/Wifi/WifiInfo.cs | 9 + .../Generated/Android/Widget/AdapterView.cs | 90 +++++++- .../Android/Widget/AutoCompleteTextView.cs | 2 +- .../Generated/Java/Lang/AllPackageClasses.cs | 43 ++++ .../Netdroid/Generated/Java/Lang/Runtime.cs | 197 ++++++++++++++++++ .../Java/Lang/Runtime/AllPackageClasses.cs | 44 ---- .../Java/Lang/Runtime/ObjectMethods.cs | 73 ------- .../Generated/Java/Time/Chrono/Chronology.cs | 6 +- 8 files changed, 338 insertions(+), 126 deletions(-) delete mode 100644 src/net/Netdroid/Generated/Java/Lang/Runtime/ObjectMethods.cs diff --git a/src/net/Netdroid/Generated/Android/Net/Wifi/WifiInfo.cs b/src/net/Netdroid/Generated/Android/Net/Wifi/WifiInfo.cs index 6b9871561..0d0c3641e 100644 --- a/src/net/Netdroid/Generated/Android/Net/Wifi/WifiInfo.cs +++ b/src/net/Netdroid/Generated/Android/Net/Wifi/WifiInfo.cs @@ -179,6 +179,15 @@ public Android.Net.MacAddress GetApMldMacAddress() return IExecuteWithSignature("getApMldMacAddress", "()Landroid/net/MacAddress;"); } /// + /// + /// + /// + /// + public Android.Net.TransportInfo MakeCopy(long arg0) + { + return IExecuteWithSignature("makeCopy", "(J)Landroid/net/TransportInfo;", arg0); + } + /// /// /// /// diff --git a/src/net/Netdroid/Generated/Android/Widget/AdapterView.cs b/src/net/Netdroid/Generated/Android/Widget/AdapterView.cs index c7dabcebf..147902457 100644 --- a/src/net/Netdroid/Generated/Android/Widget/AdapterView.cs +++ b/src/net/Netdroid/Generated/Android/Widget/AdapterView.cs @@ -835,12 +835,85 @@ public T GetAdapter() { return IExecuteWithSignature("getAdapter", "()Landroid/widget/Adapter;"); } - + /// + /// + /// + /// + public T GetAdapterDirect() + { + return IExecuteWithSignature("getAdapter", "()Landroid/widget/Adapter;"); } - + /// + /// + /// + /// + public void SetAdapter(T arg0) + { + IExecuteWithSignature("setAdapter", "(Landroid/widget/Adapter;)V", arg0); } - - + /// + /// + /// + /// + public void SetSelection(int arg0) + { + IExecuteWithSignature("setSelection", "(I)V", arg0); + } + /// + /// + /// + /// + public Android.View.View GetEmptyView() + { + return IExecuteWithSignature("getEmptyView", "()Landroid/view/View;"); + } + /// + /// + /// + /// + /// + /// + /// + public bool PerformItemClick(Android.View.View arg0, int arg1, long arg2) + { + return IExecute("performItemClick", arg0, arg1, arg2); + } + /// + /// + /// + /// + public Android.Widget.AdapterView.OnItemClickListener GetOnItemClickListener() + { + return IExecuteWithSignature("getOnItemClickListener", "()Landroid/widget/AdapterView$OnItemClickListener;"); + } + /// + /// + /// + /// + public Android.Widget.AdapterView.OnItemClickListener GetOnItemClickListenerDirect() + { + return IExecuteWithSignature("getOnItemClickListener", "()Landroid/widget/AdapterView$OnItemClickListener;"); + } + /// + /// + /// + /// + public Android.Widget.AdapterView.OnItemLongClickListener GetOnItemLongClickListener() + { + return IExecuteWithSignature("getOnItemLongClickListener", "()Landroid/widget/AdapterView$OnItemLongClickListener;"); + } + /// + /// + /// + /// + public Android.Widget.AdapterView.OnItemLongClickListener GetOnItemLongClickListenerDirect() + { + return IExecuteWithSignature("getOnItemLongClickListener", "()Landroid/widget/AdapterView$OnItemLongClickListener;"); + } + /// + /// + /// + /// public Android.Widget.AdapterView.OnItemSelectedListener GetOnItemSelectedListener() { return IExecuteWithSignature("getOnItemSelectedListener", "()Landroid/widget/AdapterView$OnItemSelectedListener;"); @@ -861,7 +934,14 @@ public int GetCount() { return IExecuteWithSignature("getCount", "()I"); } - + /// + /// + /// + /// + public int GetFirstVisiblePosition() + { + return IExecuteWithSignature("getFirstVisiblePosition", "()I"); + } /// /// /// diff --git a/src/net/Netdroid/Generated/Android/Widget/AutoCompleteTextView.cs b/src/net/Netdroid/Generated/Android/Widget/AutoCompleteTextView.cs index 3e26d4fec..5a897c00f 100644 --- a/src/net/Netdroid/Generated/Android/Widget/AutoCompleteTextView.cs +++ b/src/net/Netdroid/Generated/Android/Widget/AutoCompleteTextView.cs @@ -100,7 +100,7 @@ public AutoCompleteTextView(Android.Content.Context arg0) /// /// /// - public void SetAdapter(T arg0) where T : Android.Widget.IListAdapter, Android.Widget.IFilterable, new() + public void SetAdapter(T arg0) where T : Android.Widget.IListAdapter, new(), Android.Widget.IFilterable, new() { IExecuteWithSignature("setAdapter", "(Landroid/widget/ListAdapter;)V", arg0); } diff --git a/src/net/Netdroid/Generated/Java/Lang/AllPackageClasses.cs b/src/net/Netdroid/Generated/Java/Lang/AllPackageClasses.cs index 3b61c76b7..12617c5ef 100644 --- a/src/net/Netdroid/Generated/Java/Lang/AllPackageClasses.cs +++ b/src/net/Netdroid/Generated/Java/Lang/AllPackageClasses.cs @@ -1836,6 +1836,49 @@ public Runnable(params object[] args) : base(args) { } } #endregion + #region Runtime + /// + /// + /// + public partial class Runtime : MASES.JCOBridge.C2JBridge.JVMBridgeBase + { + const string _bridgeClassName = "java.lang.Runtime"; + /// + /// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge + /// + public Runtime() { } + /// + /// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class + /// + public Runtime(params object[] args) : base(args) { } + + private static readonly IJavaType LocalBridgeClazz = ClazzOf(_bridgeClassName); + + /// + /// + /// + public override string BridgeClassName => _bridgeClassName; + /// + /// + /// + public override bool IsBridgeAbstract => false; + /// + /// + /// + public override bool IsBridgeCloseable => false; + /// + /// + /// + public override bool IsBridgeInterface => false; + /// + /// + /// + public override bool IsBridgeStatic => false; + + // TODO: complete the class + + } + #endregion #region RuntimePermission /// diff --git a/src/net/Netdroid/Generated/Java/Lang/Runtime.cs b/src/net/Netdroid/Generated/Java/Lang/Runtime.cs index 26dcc702e..232f36cda 100644 --- a/src/net/Netdroid/Generated/Java/Lang/Runtime.cs +++ b/src/net/Netdroid/Generated/Java/Lang/Runtime.cs @@ -25,6 +25,203 @@ namespace Java.Lang { + #region Runtime + public partial class Runtime + { + #region Constructors + #endregion + #region Class/Interface conversion operators + + #endregion + + #region Fields + + #endregion + + #region Static methods + /// + /// + /// + /// + public static Java.Lang.Runtime GetRuntime() + { + return SExecuteWithSignature(LocalBridgeClazz, "getRuntime", "()Ljava/lang/Runtime;"); + } + + #endregion + + #region Instance methods + /// + /// + /// + /// + /// + public bool RemoveShutdownHook(Java.Lang.Thread arg0) + { + return IExecuteWithSignature("removeShutdownHook", "(Ljava/lang/Thread;)Z", arg0); + } + /// + /// + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String arg0, Java.Lang.String[] arg1, Java.Io.File arg2) + { + return IExecute("exec", arg0, arg1, arg2); + } + /// + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String arg0, Java.Lang.String[] arg1) + { + return IExecute("exec", arg0, arg1); + } + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String arg0) + { + return IExecuteWithSignature("exec", "(Ljava/lang/String;)Ljava/lang/Process;", arg0); + } + /// + /// + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String[] arg0, Java.Lang.String[] arg1, Java.Io.File arg2) + { + return IExecute("exec", arg0, arg1, arg2); + } + /// + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String[] arg0, Java.Lang.String[] arg1) + { + return IExecute("exec", arg0, arg1); + } + /// + /// + /// + /// + /// + /// + public Java.Lang.Process Exec(Java.Lang.String[] arg0) + { + return IExecuteWithSignature("exec", "([Ljava/lang/String;)Ljava/lang/Process;", new object[] { arg0 }); + } + /// + /// + /// + /// + public int AvailableProcessors() + { + return IExecuteWithSignature("availableProcessors", "()I"); + } + /// + /// + /// + /// + public long FreeMemory() + { + return IExecuteWithSignature("freeMemory", "()J"); + } + /// + /// + /// + /// + public long MaxMemory() + { + return IExecuteWithSignature("maxMemory", "()J"); + } + /// + /// + /// + /// + public long TotalMemory() + { + return IExecuteWithSignature("totalMemory", "()J"); + } + /// + /// + /// + public void Gc() + { + IExecuteWithSignature("gc", "()V"); + } + /// + /// + /// + /// + public void AddShutdownHook(Java.Lang.Thread arg0) + { + IExecuteWithSignature("addShutdownHook", "(Ljava/lang/Thread;)V", arg0); + } + /// + /// + /// + /// + public void Exit(int arg0) + { + IExecuteWithSignature("exit", "(I)V", arg0); + } + /// + /// + /// + /// + public void Halt(int arg0) + { + IExecuteWithSignature("halt", "(I)V", arg0); + } + /// + /// + /// + /// + public void Load(Java.Lang.String arg0) + { + IExecuteWithSignature("load", "(Ljava/lang/String;)V", arg0); + } + /// + /// + /// + /// + public void LoadLibrary(Java.Lang.String arg0) + { + IExecuteWithSignature("loadLibrary", "(Ljava/lang/String;)V", arg0); + } + /// + /// + /// + public void RunFinalization() + { + IExecuteWithSignature("runFinalization", "()V"); + } + + #endregion + + #region Nested classes + + #endregion + + // TODO: complete the class + } + #endregion } \ No newline at end of file diff --git a/src/net/Netdroid/Generated/Java/Lang/Runtime/AllPackageClasses.cs b/src/net/Netdroid/Generated/Java/Lang/Runtime/AllPackageClasses.cs index 057139c58..8c40e1c01 100644 --- a/src/net/Netdroid/Generated/Java/Lang/Runtime/AllPackageClasses.cs +++ b/src/net/Netdroid/Generated/Java/Lang/Runtime/AllPackageClasses.cs @@ -26,50 +26,6 @@ namespace Java.Lang.Runtime { - #region ObjectMethods - /// - /// - /// - public partial class ObjectMethods : MASES.JCOBridge.C2JBridge.JVMBridgeBase - { - const string _bridgeClassName = "java.lang.runtime.ObjectMethods"; - /// - /// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge - /// - public ObjectMethods() { } - /// - /// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class - /// - public ObjectMethods(params object[] args) : base(args) { } - - private static readonly IJavaType LocalBridgeClazz = ClazzOf(_bridgeClassName); - - /// - /// - /// - public override string BridgeClassName => _bridgeClassName; - /// - /// - /// - public override bool IsBridgeAbstract => false; - /// - /// - /// - public override bool IsBridgeCloseable => false; - /// - /// - /// - public override bool IsBridgeInterface => false; - /// - /// - /// - public override bool IsBridgeStatic => false; - - // TODO: complete the class - - } - #endregion - } \ No newline at end of file diff --git a/src/net/Netdroid/Generated/Java/Lang/Runtime/ObjectMethods.cs b/src/net/Netdroid/Generated/Java/Lang/Runtime/ObjectMethods.cs deleted file mode 100644 index cee76e56f..000000000 --- a/src/net/Netdroid/Generated/Java/Lang/Runtime/ObjectMethods.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Copyright 2024 MASES s.r.l. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -* Refer to LICENSE for more information. -*/ - -/* -* This file is generated by MASES.JNetReflector (ver. 2.5.1.0) -* using android.jar as reference -*/ - -using MASES.JCOBridge.C2JBridge; - -namespace Java.Lang.Runtime -{ - #region ObjectMethods - public partial class ObjectMethods - { - #region Constructors - - #endregion - - #region Class/Interface conversion operators - - #endregion - - #region Fields - - #endregion - - #region Static methods - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public static object Bootstrap(Java.Lang.Invoke.MethodHandles.Lookup arg0, Java.Lang.String arg1, Java.Lang.Invoke.TypeDescriptor arg2, Java.Lang.Class arg3, Java.Lang.String arg4, params Java.Lang.Invoke.MethodHandle[] arg5) - { - if (arg5.Length == 0) return SExecute(LocalBridgeClazz, "bootstrap", arg0, arg1, arg2, arg3, arg4); else return SExecute(LocalBridgeClazz, "bootstrap", arg0, arg1, arg2, arg3, arg4, arg5); - } - - #endregion - - #region Instance methods - - #endregion - - #region Nested classes - - #endregion - - // TODO: complete the class - } - #endregion -} \ No newline at end of file diff --git a/src/net/Netdroid/Generated/Java/Time/Chrono/Chronology.cs b/src/net/Netdroid/Generated/Java/Time/Chrono/Chronology.cs index a99d30993..108c792dd 100644 --- a/src/net/Netdroid/Generated/Java/Time/Chrono/Chronology.cs +++ b/src/net/Netdroid/Generated/Java/Time/Chrono/Chronology.cs @@ -291,7 +291,7 @@ public Java.Time.Chrono.ChronoLocalDate DateYearDay(Java.Time.Chrono.Era arg0, i /// /// /// - public Java.Time.Chrono.ChronoLocalDateTime LocalDateTime(Java.Time.Temporal.TemporalAccessor arg0) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate, new() + public Java.Time.Chrono.ChronoLocalDateTime LocalDateTime(Java.Time.Temporal.TemporalAccessor arg0) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate { return IExecuteWithSignature>("localDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoLocalDateTime;", arg0); } @@ -313,7 +313,7 @@ public Java.Time.Chrono.ChronoPeriod Period(int arg0, int arg1, int arg2) /// /// /// - public Java.Time.Chrono.ChronoZonedDateTime ZonedDateTime(Java.Time.Instant arg0, Java.Time.ZoneId arg1) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate, new() + public Java.Time.Chrono.ChronoZonedDateTime ZonedDateTime(Java.Time.Instant arg0, Java.Time.ZoneId arg1) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate { return IExecute>("zonedDateTime", arg0, arg1); } @@ -323,7 +323,7 @@ public Java.Time.Chrono.ChronoPeriod Period(int arg0, int arg1, int arg2) /// /// /// - public Java.Time.Chrono.ChronoZonedDateTime ZonedDateTime(Java.Time.Temporal.TemporalAccessor arg0) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate, new() + public Java.Time.Chrono.ChronoZonedDateTime ZonedDateTime(Java.Time.Temporal.TemporalAccessor arg0) where ReturnExtendsJava_Time_Chrono_ChronoLocalDate : Java.Time.Chrono.ChronoLocalDate { return IExecuteWithSignature>("zonedDateTime", "(Ljava/time/temporal/TemporalAccessor;)Ljava/time/chrono/ChronoZonedDateTime;", arg0); }