Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b6d2653
Bump MASES.JCOBridge from 2.6.9-rc.25 to 2.6.9-rc.27
dependabot[bot] May 21, 2026
40ca694
Adds new constructor in templates to support parameter forwarding wit…
masesdevelopers May 21, 2026
6d85a65
Forward applies when needed
masesdevelopers May 21, 2026
315af1b
Removes constructor chaining using InvokeInitializer to build remote …
masesdevelopers May 21, 2026
d2d02b6
Update constructor logic
masesdevelopers May 21, 2026
586990c
Bump MASES.JCOBridge from 2.6.9-rc.27 to 2.6.9-rc.28
dependabot[bot] May 21, 2026
9a8aecd
Merge remote-tracking branch 'origin/dependabot/nuget/src/net/JNet/mu…
masesdevelopers May 21, 2026
a4a5d46
Little update
masesdevelopers May 21, 2026
f100d4d
Update developed code
masesdevelopers May 21, 2026
f5f0861
Update test since ctor are more strictly
masesdevelopers May 21, 2026
8148e7d
Fix
masesdevelopers May 21, 2026
26bae7d
Trigger a new run
masesdevelopers May 21, 2026
5a93492
Merge branch 'master' into 1062-update-constructor-chain-adding-new-s…
masesdevelopers May 21, 2026
ebea369
Bump MASES.JCOBridge from 2.6.9-rc.28 to 2.6.9-rc.29
dependabot[bot] May 22, 2026
4597b02
Merge remote-tracking branch 'origin/dependabot/nuget/src/net/JNet/mu…
masesdevelopers May 22, 2026
70d9568
Bump MASES.JCOBridge from 2.6.9-rc.28 to 2.6.9-rc.30
dependabot[bot] May 22, 2026
2dcce6e
Merge remote-tracking branch 'origin/dependabot/nuget/src/net/JNet/mu…
masesdevelopers May 22, 2026
8f82cd1
Merge branch 'master' into 1062-update-constructor-chain-adding-new-s…
masesdevelopers May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/net/JNet/Developed/Java/Lang/Iterable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,9 @@ public class Iterable : JVMBridgeBaseEnumerable<Iterable>, IIterable
public override string BridgeClassName => "java.lang.Iterable";
/// <inheritdoc />
public override bool IsBridgeInterface => true;
/// <summary>
/// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
/// </summary>
public Iterable() { }
/// <inheritdoc/>
public Iterable(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <summary>
/// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
/// </summary>
public Iterable(params object[] args) : base(args) { }
/// <summary>
/// Returns an iterator over elements of type <see langref="object"/>
/// </summary>
/// <returns>An <see cref="Util.Iterator{T}"/></returns>
Expand Down Expand Up @@ -84,16 +76,8 @@ public class Iterable<T> : MASES.JNet.Specific.JNetAsyncEnumerable<Iterable<T>,
public override string BridgeClassName => "java.lang.Iterable";
/// <inheritdoc />
public override bool IsBridgeInterface => true;
/// <summary>
/// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
/// </summary>
public Iterable() { }
/// <inheritdoc/>
public Iterable(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <summary>
/// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
/// </summary>
public Iterable(params object[] args) : base(args) { }

/// <summary>
/// Returns an iterator over elements of type <typeparamref name="T"/>.
Expand Down
2 changes: 0 additions & 2 deletions src/net/JNet/Developed/Java/Util/Collection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public partial class Collection<E>
/// <typeparam name="E"><see href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html"/></typeparam>
public class Collection<E> : Java.Lang.Iterable<E>
{
/// <inheritdoc/>
public Collection() { }
/// <inheritdoc/>
public Collection(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <inheritdoc />
Expand Down
6 changes: 4 additions & 2 deletions src/net/JNet/Developed/Java/Util/Concurrent/ForkJoinPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ public partial class ForkJoinPool
/// <param name="arg8"><see cref="long"/></param>
/// <param name="arg9"><see cref="Java.Util.Concurrent.TimeUnit"/></param>
public ForkJoinPool(int arg0, Java.Util.Concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory arg1, Java.Lang.Thread.UncaughtExceptionHandler arg2, bool arg3, int arg4, int arg5, int arg6, Java.Util.Function.Predicate arg7, long arg8, Java.Util.Concurrent.TimeUnit arg9)
: base(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
: base(MASES.JCOBridge.C2JBridge.JVMBridgeBase.InitializerInstance)
{
InvokeInitializer(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
}
/// <summary>
/// <see href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ForkJoinPool.html#%3Cinit%3E(int,java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory,java.lang.Thread.UncaughtExceptionHandler,boolean)"/>
Expand All @@ -45,8 +46,9 @@ public ForkJoinPool(int arg0, Java.Util.Concurrent.ForkJoinPool.ForkJoinWorkerTh
/// <param name="arg2"><see cref="Java.Lang.Thread.UncaughtExceptionHandler"/></param>
/// <param name="arg3"><see cref="bool"/></param>
public ForkJoinPool(int arg0, Java.Util.Concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory arg1, Java.Lang.Thread.UncaughtExceptionHandler arg2, bool arg3)
: base(arg0, arg1, arg2, arg3)
: base(MASES.JCOBridge.C2JBridge.JVMBridgeBase.InitializerInstance)
{
InvokeInitializer(arg0, arg1, arg2, arg3);
}
}
}
16 changes: 0 additions & 16 deletions src/net/JNet/Developed/Java/Util/Iterator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,9 @@ public partial class Iterator : MASES.JCOBridge.C2JBridge.JVMBridgeBase<Iterator
public override string BridgeClassName => "java.util.Iterator";
/// <inheritdoc />
public override bool IsBridgeInterface => true;
/// <summary>
/// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
/// </summary>
public Iterator() { }
/// <inheritdoc/>
public Iterator(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <summary>
/// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
/// </summary>
public Iterator(params object[] args) : base(args) { }
/// <summary>
/// <see href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html#hasNext()"/>
/// </summary>
public bool HasNext() => IExecute<bool>("hasNext");
Expand Down Expand Up @@ -106,17 +98,9 @@ public partial class Iterator<E> : JVMBridgeBase<Iterator<E>>, IIterator<E>
public override string BridgeClassName => "java.util.Iterator";
/// <inheritdoc />
public override bool IsBridgeInterface => true;
/// <summary>
/// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
/// </summary>
public Iterator() { }
/// <inheritdoc/>
public Iterator(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <summary>
/// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
/// </summary>
public Iterator(params object[] args) : base(args) { }
/// <summary>
/// Converts an <see cref="Iterator{E}"/> to a <see cref="JVMBridgeBaseEnumerator{E}"/>
/// </summary>
public static implicit operator JVMBridgeBaseEnumerator<E>(Iterator<E> it) => new JVMBridgeBaseEnumerator<E>(it.BridgeInstance);
Expand Down
13 changes: 1 addition & 12 deletions src/net/JNet/Specific/AsyncEnumerable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,9 @@ public ValueTask<bool> MoveNextAsync()
public abstract class JNetAsyncEnumerable<TClass, TObject> : JVMBridgeBaseEnumerable<TClass, TObject>, IAsyncEnumerable<TObject>
where TClass : class, IJVMBridgeBase
{
/// <summary>
/// Create an instance of <see cref="JNetAsyncEnumerable{TClass, TObject}"/>
/// </summary>
public JNetAsyncEnumerable() { }
/// <inheritdoc/>
public JNetAsyncEnumerable(IJVMBridgeBaseInitializer initializer) : base(initializer) { }
/// <summary>
/// Create an instance of <see cref="JNetAsyncEnumerable{TClass, TObject}"/>
/// </summary>
/// <param name="args">The arguments to send to base class <see cref="JVMBridgeBaseEnumerable{TClass,TObject}"/></param>
public JNetAsyncEnumerable(params object[] args)
: base(args)
{
}

/// <inheritdoc cref="IAsyncEnumerable{TObject}.GetAsyncEnumerator(CancellationToken)"/>
public IAsyncEnumerator<TObject> GetAsyncEnumerator(CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ public partial class ALLPACKAGE_CLASSES_STUB_CLASS_PLACEHOLDER : ALLPACKAGE_CLAS
[global::System.Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER(IJVMBridgeBaseInitializer initializer) : base(initializer) { }

/// <summary>
/// Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.
/// </summary>
public ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER(params object[] args) : base(args) { }

private static readonly global::System.Exception _LocalBridgeClazzException = null;
private static readonly MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType _LocalBridgeClazz = JVMBridgeBase.ClazzOf(_bridgeClassName, out _LocalBridgeClazzException, false);
private static MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType LocalBridgeClazz => _LocalBridgeClazz ?? throw _LocalBridgeClazzException ?? new global::System.InvalidOperationException($"Class {_bridgeClassName} was not found.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ public partial class ALLPACKAGE_CLASSES_STUB_CLASS_PLACEHOLDER : ALLPACKAGE_CLAS
[global::System.Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER(IJVMBridgeBaseInitializer initializer) : base(initializer) { }

/// <summary>
/// Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.
/// </summary>
/// <remarks>
/// <see cref="ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER"/> represents a JVM interface or abstract class in .NET.
/// Instantiating it directly outside of JCOBridge infrastructure is not supported and may produce undefined behavior.
/// </remarks>
[global::System.Obsolete("ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER class represents, in .NET, an instance of a JVM interface or abstract class. This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ALLPACKAGE_CLASSES_STUB_SIMPLECLASS_PLACEHOLDER(params object[] args) : base(args) { }

private static readonly global::System.Exception _LocalBridgeClazzException = null;
private static readonly MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType _LocalBridgeClazz = JVMBridgeBase.ClazzOf(_bridgeClassName, out _LocalBridgeClazzException, false);
private static MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType LocalBridgeClazz => _LocalBridgeClazz ?? throw _LocalBridgeClazzException ?? new global::System.InvalidOperationException($"Class {_bridgeClassName} was not found.");
Expand Down
4 changes: 2 additions & 2 deletions src/net/JNetReflector/Templates/SingleConstructor.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CONSTRUCTOR_STUB_CONSTRUCTOR_DECORATION_PLACEHOLDER
publicCONSTRUCTOR_STUB_MODIFIER_PLACEHOLDER CONSTRUCTOR_STUB_CONSTRUCTOR_NAME_PLACEHOLDER(CONSTRUCTOR_STUB_PARAMETERS_PLACEHOLDER)
: base(CONSTRUCTOR_STUB_EXECUTION_PLACEHOLDER)
publicCONSTRUCTOR_STUB_MODIFIER_PLACEHOLDER CONSTRUCTOR_STUB_CONSTRUCTOR_NAME_PLACEHOLDER(CONSTRUCTOR_STUB_PARAMETERS_PLACEHOLDER) : base(JVMBridgeBase.InitializerInstance)
{
InvokeInitializer(CONSTRUCTOR_STUB_EXECUTION_PLACEHOLDER);
}
6 changes: 3 additions & 3 deletions tests/net/JNetTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static void TestExtensions()
if (printVerbose) System.Console.WriteLine($"{tuple.Item1} Elapsed ticks: {w.Elapsed.Ticks}");

w.Restart();
Java.Util.ArrayList<Integer> alist = new Java.Util.ArrayList<Integer>();
Java.Util.ArrayList<Integer> alist = new();
for (int i = 0; i < elementsInexecution; i++)
{
alist.Add(i);
Expand All @@ -640,7 +640,7 @@ static void TestExtensions()

w.Restart();
var tmpJList = JNetHelper.ListFrom(tmpArray);
alist = new Java.Util.ArrayList<Integer>(tmpJList);
Java.Util.ArrayList rawArraylist = new(tmpJList);
w.Stop();
tuple = new System.Tuple<string, long>("Java.Util.ArrayList from array", w.Elapsed.Ticks);
singleExecutionData.Add(tuple);
Expand All @@ -663,7 +663,7 @@ static void TestExtensions()

w.Restart();
var tmpJList3 = JNetHelper.ListFrom(tmpArray, true);
alist = new Java.Util.ArrayList<Integer>(tmpJList3);
rawArraylist = new Java.Util.ArrayList(tmpJList3);
w.Stop();
tuple = new System.Tuple<string, long>("Java.Util.ArrayList from raw array buffered", w.Elapsed.Ticks);
singleExecutionData.Add(tuple);
Expand Down
Loading