Skip to content
This repository was archived by the owner on Oct 26, 2026. It is now read-only.

Add more noticable nullable parameter notation - #100

Merged
hinerm merged 1 commit into
mainfrom
scijava/scijava-ops-engine/clarify-nullable-param-descriptions
Dec 13, 2023
Merged

hinerm merged 1 commit into
mainfrom
scijava/scijava-ops-engine/clarify-nullable-param-descriptions

Conversation

@gselzer

@gselzer gselzer commented Dec 12, 2023

Copy link
Copy Markdown
Member

This PR adds more visible notation for Ops with nullable parameters. For example, given the Op

    @OpMethod(names="test.nullableMethod", type=BiFunction.class)
    public static Integer nullableMethod(Integer i1, @Nullable Integer i2) {
        if (i2 == null) i2 = 0;
        return i1 + i2;
    }

And for the following help call:

var actual = ops.help("test.nullableMethod");

The following text is returned

Ops:
	> test.nullableMethod(
		 Inputs:
			Integer input1
			Integer input2 = null
		 Outputs:
			Integer output1
	)

@gselzer gselzer self-assigned this Dec 12, 2023
@hinerm
hinerm merged commit d791d4f into main Dec 13, 2023
@hinerm
hinerm deleted the scijava/scijava-ops-engine/clarify-nullable-param-descriptions branch December 13, 2023 16:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SciJava Ops descriptions output is confusing, can we improve it?

2 participants