Skip to content

Add stream support for array return types#1013

Open
masesdevelopers wants to merge 3 commits into
masterfrom
1012-introduce-in-jnetreflector-ability-to-use-jcobridgestreamt
Open

Add stream support for array return types#1013
masesdevelopers wants to merge 3 commits into
masterfrom
1012-introduce-in-jnetreflector-ability-to-use-jcobridgestreamt

Conversation

@masesdevelopers

Copy link
Copy Markdown
Contributor

Description

Introduce stream handling for methods/properties/fields that return Java array types of native or boxed primitives. Added new constants (ArrayTypeMethodTrailer, StreamTypeMethodTrailer), helper methods (IsJVMNativeRawOrBoxedType, JVMNativeRawOrBoxedToNetType) and extended ToNetType to accept useNullable/useDirectDotNetType flags. Updated code generation to emit JCOBridgeStream members and corresponding execution stubs for array-of-primitive/boxed types, and adjusted several call sites to pass the new ToNetType flags. These changes enable streaming variants for array returns while preserving existing type mapping behavior.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

dependabot Bot and others added 2 commits April 28, 2026 17:27
---
updated-dependencies:
- dependency-name: MASES.JCOBridge
  dependency-version: 2.6.9-rc7
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: MASES.JCOBridge
  dependency-version: 2.6.9-rc7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Introduce stream handling for methods/properties/fields that return Java array types of native or boxed primitives. Added new constants (ArrayTypeMethodTrailer, StreamTypeMethodTrailer), helper methods (IsJVMNativeRawOrBoxedType, JVMNativeRawOrBoxedToNetType) and extended ToNetType to accept useNullable/useDirectDotNetType flags. Updated code generation to emit JCOBridgeStream<T> members and corresponding execution stubs for array-of-primitive/boxed types, and adjusted several call sites to pass the new ToNetType flags. These changes enable streaming variants for array returns while preserving existing type mapping behavior.
@masesdevelopers masesdevelopers self-assigned this Apr 29, 2026
@masesdevelopers masesdevelopers added enhancement New feature or request JNetReflector JNetReflector related issue labels Apr 29, 2026
@masesdevelopers masesdevelopers added the .NET Pull requests that update .net code label Apr 29, 2026
Comment thread src/net/JNetReflector/InternalMethods.cs Fixed
Comment thread src/net/JNetReflector/InternalMethods.cs Fixed
Comment thread src/net/JNetReflector/InternalMethods.cs Fixed
Comment thread src/net/JNetReflector/InternalMethods.cs Fixed
execStub += "Array";
if (returnType.IsJVMNativeRawOrBoxedType())
{
streamReturnType = returnType.JVMNativeRawOrBoxedToNetType();
if (returnType.IsJVMNativeRawOrBoxedType())
{
streamReturnType = returnType.JVMNativeRawOrBoxedToNetType();
streamExecStub = execStub + SpecialNames.StreamTypeMethodTrailer;
getFunction += "Array";
if (fieldType.IsJVMNativeRawOrBoxedType())
{
getStreamType = fieldType.JVMNativeRawOrBoxedToNetType();
if (fieldType.IsJVMNativeRawOrBoxedType())
{
getStreamType = fieldType.JVMNativeRawOrBoxedToNetType();
getStreamFunction = getFunction + SpecialNames.StreamTypeMethodTrailer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request JNetReflector JNetReflector related issue .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce in JNetReflector ability to use JCOBridgeStream<T>

1 participant