Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rmuller/python-explicit-return-annotation
Browse files Browse the repository at this point in the history
RomainMuller authored May 11, 2020
2 parents 9e8f77c + bb08ccb commit 7285baf
Showing 34 changed files with 1,285 additions and 84 deletions.
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime/src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<PackageReference Update="Microsoft.Extensions.Logging" Version="3.1.3" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="3.1.3" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.6.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Update="NSubstitute" Version="4.2.1" />
<PackageReference Update="xunit" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.1" />
34 changes: 34 additions & 0 deletions packages/jsii-calc/lib/stability.ts
Original file line number Diff line number Diff line change
@@ -102,3 +102,37 @@ export enum DeprecatedEnum {
/** @deprecated option B is kinda bad, too */
OPTION_B
}

/** @external */
export interface ExternalStruct {
/** @external */
readonly readonlyProperty: string;
}
/** @external */
export interface IExternalInterface {
/** @external */
mutableProperty?: number;
/** @external */
method(): void;
}
/** @external */
export class ExternalClass {
/** @external */
public readonly readonlyProperty: string = 'wazoo';
/** @external */
public mutableProperty?: number;
/** @external */
constructor(readonlyString: string, mutableNumber?: number) {
this.readonlyProperty = readonlyString;
this.mutableProperty = mutableNumber;
}
/** @external */
public method(): void { return; }
}
/** @external */
export enum ExternalEnum {
/** @external */
OPTION_A,
/** @external */
OPTION_B
}
217 changes: 216 additions & 1 deletion packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
@@ -4455,6 +4455,169 @@
}
]
},
"jsii-calc.ExternalClass": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalClass",
"initializer": {
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"parameters": [
{
"name": "readonlyString",
"type": {
"primitive": "string"
}
},
{
"name": "mutableNumber",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"kind": "class",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 119
},
"methods": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 130
},
"name": "method"
}
],
"name": "ExternalClass",
"properties": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/stability.ts",
"line": 121
},
"name": "readonlyProperty",
"type": {
"primitive": "string"
}
},
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 123
},
"name": "mutableProperty",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"jsii-calc.ExternalEnum": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalEnum",
"kind": "enum",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 133
},
"members": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"name": "OPTION_A"
},
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"name": "OPTION_B"
}
],
"name": "ExternalEnum"
},
"jsii-calc.ExternalStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalStruct",
"kind": "interface",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 107
},
"name": "ExternalStruct",
"properties": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/stability.ts",
"line": 109
},
"name": "readonlyProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.GiveMeStructs": {
"assembly": "jsii-calc",
"docs": {
@@ -4992,6 +5155,58 @@
}
]
},
"jsii-calc.IExternalInterface": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.IExternalInterface",
"kind": "interface",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 112
},
"methods": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 116
},
"name": "method"
}
],
"name": "IExternalInterface",
"properties": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 114
},
"name": "mutableProperty",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"jsii-calc.IFriendlier": {
"assembly": "jsii-calc",
"docs": {
@@ -12585,5 +12800,5 @@
}
},
"version": "0.0.0",
"fingerprint": "DX1QMQgQSTuLzsXpnv5YcFSvPRw/30xHOP5U+5pQY0o="
"fingerprint": "sBk+g8M/UxDdbco/a9UXJtumXd2eCRRLsERa1ajaJvo="
}
Original file line number Diff line number Diff line change
@@ -99,7 +99,9 @@ export class DotNetDocGenerator {
// All the "tags" need to be rendered with empyt lines between them or they'll be word wrapped.

if (docs.default) { emitDocAttribute('default', docs.default); }
if (docs.stability) { emitDocAttribute('stability', this.nameutils.capitalizeWord(docs.stability)); }
if (docs.stability && shouldMentionStability(docs.stability)) {
emitDocAttribute('stability', this.nameutils.capitalizeWord(docs.stability));
}
if (docs.see) { emitDocAttribute('see', docs.see); }
if (docs.subclassable) { emitDocAttribute('subclassable', ''); }
for (const [k, v] of Object.entries(docs.custom || {})) {
@@ -167,3 +169,8 @@ export class DotNetDocGenerator {
function ucFirst(x: string) {
return x.substr(0, 1).toUpperCase() + x.substr(1);
}

function shouldMentionStability(s: spec.Stability) {
// Don't render "stable" or "external", those are both stable by implication
return s === spec.Stability.Deprecated || s === spec.Stability.Experimental;
}
4 changes: 3 additions & 1 deletion packages/jsii-pacmak/lib/targets/java.ts
Original file line number Diff line number Diff line change
@@ -1110,7 +1110,9 @@ class JavaGenerator extends Generator {
case spec.Stability.Experimental:
return 'Experimental';
case spec.Stability.External:
return 'External';
// Rendering 'External' out as publicly visible state is confusing. As far
// as users are concerned we just advertise this as stable.
return 'Stable';
case spec.Stability.Stable:
return 'Stable';
default:
1 change: 1 addition & 0 deletions packages/jsii-pacmak/lib/targets/python.ts
Original file line number Diff line number Diff line change
@@ -2132,6 +2132,7 @@ function onelineDescription(docs: spec.Docs | undefined) {
}

function shouldMentionStability(s: Stability) {
// Don't render "stable" or "external", those are both stable by implication.
return s === Stability.Deprecated || s === Stability.Experimental;
}

Original file line number Diff line number Diff line change
@@ -4455,6 +4455,169 @@
}
]
},
"jsii-calc.ExternalClass": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalClass",
"initializer": {
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"parameters": [
{
"name": "readonlyString",
"type": {
"primitive": "string"
}
},
{
"name": "mutableNumber",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"kind": "class",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 119
},
"methods": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 130
},
"name": "method"
}
],
"name": "ExternalClass",
"properties": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/stability.ts",
"line": 121
},
"name": "readonlyProperty",
"type": {
"primitive": "string"
}
},
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 123
},
"name": "mutableProperty",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"jsii-calc.ExternalEnum": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalEnum",
"kind": "enum",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 133
},
"members": [
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"name": "OPTION_A"
},
{
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"name": "OPTION_B"
}
],
"name": "ExternalEnum"
},
"jsii-calc.ExternalStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.ExternalStruct",
"kind": "interface",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 107
},
"name": "ExternalStruct",
"properties": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/stability.ts",
"line": 109
},
"name": "readonlyProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.GiveMeStructs": {
"assembly": "jsii-calc",
"docs": {
@@ -4992,6 +5155,58 @@
}
]
},
"jsii-calc.IExternalInterface": {
"assembly": "jsii-calc",
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"fqn": "jsii-calc.IExternalInterface",
"kind": "interface",
"locationInModule": {
"filename": "lib/stability.ts",
"line": 112
},
"methods": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 116
},
"name": "method"
}
],
"name": "IExternalInterface",
"properties": [
{
"abstract": true,
"docs": {
"custom": {
"external": "true"
},
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/stability.ts",
"line": 114
},
"name": "mutableProperty",
"optional": true,
"type": {
"primitive": "number"
}
}
]
},
"jsii-calc.IFriendlier": {
"assembly": "jsii-calc",
"docs": {
@@ -12585,5 +12800,5 @@
}
},
"version": "0.0.0",
"fingerprint": "DX1QMQgQSTuLzsXpnv5YcFSvPRw/30xHOP5U+5pQY0o="
"fingerprint": "sBk+g8M/UxDdbco/a9UXJtumXd2eCRRLsERa1ajaJvo="
}
Original file line number Diff line number Diff line change
@@ -8,8 +8,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace
/// <remarks>
/// The docs are great. They're a bunch of tags.
///
/// <strong>Stability</strong>: Stable
///
/// <strong>See</strong>: https://aws.amazon.com/
///
/// <strong>CustomAttribute</strong>: hasAValue
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@ namespace Amazon.JSII.Tests.CalculatorNamespace
/// multiple lines and multiple paragraphs.
///
/// Multiple paragraphs are separated by an empty line.
///
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DocumentedClass), fullyQualifiedName: "jsii-calc.DocumentedClass")]
public class DocumentedClass : DeputyBase
@@ -40,8 +38,6 @@ protected DocumentedClass(DeputyProps props): base(props)
/// <remarks>
/// This will print out a friendly greeting intended for
/// the indicated person.
///
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiMethod(name: "greet", returnsJson: "{\"type\":{\"primitive\":\"number\"}}", parametersJson: "[{\"docs\":{\"summary\":\"The person to be greeted.\"},\"name\":\"greetee\",\"optional\":true,\"type\":{\"fqn\":\"jsii-calc.Greetee\"}}]")]
public virtual double Greet(Amazon.JSII.Tests.CalculatorNamespace.IGreetee? greetee = null)
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ExternalClass), fullyQualifiedName: "jsii-calc.ExternalClass", parametersJson: "[{\"name\":\"readonlyString\",\"type\":{\"primitive\":\"string\"}},{\"name\":\"mutableNumber\",\"optional\":true,\"type\":{\"primitive\":\"number\"}}]")]
public class ExternalClass : DeputyBase
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
public ExternalClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object?[]{readonlyString, mutableNumber}))
{
}

/// <summary>Used by jsii to construct an instance of this class from a Javascript-owned object reference</summary>
/// <param name="reference">The Javascript-owned object reference</param>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
protected ExternalClass(ByRefValue reference): base(reference)
{
}

/// <summary>Used by jsii to construct an instance of this class from DeputyProps</summary>
/// <param name="props">The deputy props</param>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
protected ExternalClass(DeputyProps props): base(props)
{
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiMethod(name: "method")]
public virtual void Method()
{
InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{});
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
public virtual string ReadonlyProperty
{
get => GetInstanceProperty<string>();
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiOptional]
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
public virtual double? MutableProperty
{
get => GetInstanceProperty<double?>();
set => SetInstanceProperty(value);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiEnum(nativeType: typeof(ExternalEnum), fullyQualifiedName: "jsii-calc.ExternalEnum")]
public enum ExternalEnum
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiEnumMember(name: "OPTION_A")]
OPTION_A,
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiEnumMember(name: "OPTION_B")]
OPTION_B
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
#pragma warning disable CS8618

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiByValue(fqn: "jsii-calc.ExternalStruct")]
public class ExternalStruct : Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}", isOverride: true)]
public string ReadonlyProperty
{
get;
set;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiTypeProxy(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")]
internal sealed class ExternalStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct
{
private ExternalStructProxy(ByRefValue reference): base(reference)
{
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
public string ReadonlyProperty
{
get => GetInstanceProperty<string>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiInterface(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")]
public interface IExternalInterface
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
[Amazon.JSII.Runtime.Deputy.JsiiOptional]
double? MutableProperty
{
get
{
return null;
}
set
{
throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented");
}
}
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiMethod(name: "method")]
void Method();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiTypeProxy(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")]
internal sealed class IExternalInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalInterface
{
private IExternalInterfaceProxy(ByRefValue reference): base(reference)
{
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiOptional]
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
public double? MutableProperty
{
get => GetInstanceProperty<double?>();
set => SetInstanceProperty(value);
}

/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiMethod(name: "method")]
public void Method()
{
InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{});
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Amazon.JSII.Runtime.Deputy;

#pragma warning disable CS0672,CS0809,CS1591

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiInterface(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")]
public interface IExternalStruct
{
/// <remarks>
/// <strong>Stability</strong>: Experimental
///
/// <strong>External</strong>: true
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
string ReadonlyProperty
{
get;
}
}
}
Original file line number Diff line number Diff line change
@@ -4,15 +4,9 @@

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiInterface(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")]
public interface IStableInterface
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
[Amazon.JSII.Runtime.Deputy.JsiiOptional]
double? MutableProperty
@@ -26,9 +20,6 @@ public interface IStableInterface
throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented");
}
}
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiMethod(name: "method")]
void Method();
}
Original file line number Diff line number Diff line change
@@ -4,19 +4,13 @@

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiTypeProxy(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")]
internal sealed class IStableInterfaceProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableInterface
{
private IStableInterfaceProxy(ByRefValue reference): base(reference)
{
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiOptional]
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
public double? MutableProperty
@@ -25,9 +19,6 @@ public double? MutableProperty
set => SetInstanceProperty(value);
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiMethod(name: "method")]
public void Method()
{
Original file line number Diff line number Diff line change
@@ -4,15 +4,9 @@

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiInterface(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")]
public interface IStableStruct
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
string ReadonlyProperty
{
Original file line number Diff line number Diff line change
@@ -4,15 +4,9 @@

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StableClass), fullyQualifiedName: "jsii-calc.StableClass", parametersJson: "[{\"name\":\"readonlyString\",\"type\":{\"primitive\":\"string\"}},{\"name\":\"mutableNumber\",\"optional\":true,\"type\":{\"primitive\":\"number\"}}]")]
public class StableClass : DeputyBase
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
public StableClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object?[]{readonlyString, mutableNumber}))
{
}
@@ -31,27 +25,18 @@ protected StableClass(DeputyProps props): base(props)
{
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiMethod(name: "method")]
public virtual void Method()
{
InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{});
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
public virtual string ReadonlyProperty
{
get => GetInstanceProperty<string>();
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiOptional]
[JsiiProperty(name: "mutableProperty", typeJson: "{\"primitive\":\"number\"}", isOptional: true)]
public virtual double? MutableProperty
Original file line number Diff line number Diff line change
@@ -5,20 +5,11 @@
namespace Amazon.JSII.Tests.CalculatorNamespace
{

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiEnum(nativeType: typeof(StableEnum), fullyQualifiedName: "jsii-calc.StableEnum")]
public enum StableEnum
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiEnumMember(name: "OPTION_A")]
OPTION_A,
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiEnumMember(name: "OPTION_B")]
OPTION_B
}
Original file line number Diff line number Diff line change
@@ -6,15 +6,9 @@ namespace Amazon.JSII.Tests.CalculatorNamespace
{
#pragma warning disable CS8618

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiByValue(fqn: "jsii-calc.StableStruct")]
public class StableStruct : Amazon.JSII.Tests.CalculatorNamespace.IStableStruct
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}", isOverride: true)]
public string ReadonlyProperty
{
Original file line number Diff line number Diff line change
@@ -4,19 +4,13 @@

namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiTypeProxy(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")]
internal sealed class StableStructProxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableStruct
{
private StableStructProxy(ByRefValue reference): base(reference)
{
}

/// <remarks>
/// <strong>Stability</strong>: Stable
/// </remarks>
[JsiiProperty(name: "readonlyProperty", typeJson: "{\"primitive\":\"string\"}")]
public string ReadonlyProperty
{
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@
namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <summary>Just because we can.</summary>
/// <remarks>
/// <strong>Stability</strong>: External
/// </remarks>
[JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StructPassing), fullyQualifiedName: "jsii-calc.StructPassing")]
public class StructPassing : DeputyBase
{
@@ -29,18 +26,12 @@ protected StructPassing(DeputyProps props): base(props)
{
}

/// <remarks>
/// <strong>Stability</strong>: External
/// </remarks>
[JsiiMethod(name: "howManyVarArgsDidIPass", returnsJson: "{\"type\":{\"primitive\":\"number\"}}", parametersJson: "[{\"name\":\"_positional\",\"type\":{\"primitive\":\"number\"}},{\"name\":\"inputs\",\"type\":{\"fqn\":\"jsii-calc.TopLevelStruct\"},\"variadic\":true}]")]
public static double HowManyVarArgsDidIPass(double positional, params Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct[] inputs)
{
return InvokeStaticMethod<double>(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructPassing), new System.Type[]{typeof(double), typeof(Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct[])}, new object[]{positional, inputs});
}

/// <remarks>
/// <strong>Stability</strong>: External
/// </remarks>
[JsiiMethod(name: "roundTrip", returnsJson: "{\"type\":{\"fqn\":\"jsii-calc.TopLevelStruct\"}}", parametersJson: "[{\"name\":\"_positional\",\"type\":{\"primitive\":\"number\"}},{\"name\":\"input\",\"type\":{\"fqn\":\"jsii-calc.TopLevelStruct\"}}]")]
public static Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct RoundTrip(double positional, Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct input)
{
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package software.amazon.jsii.tests.calculator;

/**
* EXPERIMENTAL
*/
@javax.annotation.Generated(value = "jsii-pacmak")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.ExternalClass")
public class ExternalClass extends software.amazon.jsii.JsiiObject {

protected ExternalClass(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}

protected ExternalClass(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}

/**
* EXPERIMENTAL
* <p>
* @param readonlyString This parameter is required.
* @param mutableNumber
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public ExternalClass(final @org.jetbrains.annotations.NotNull java.lang.String readonlyString, final @org.jetbrains.annotations.Nullable java.lang.Number mutableNumber) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(readonlyString, "readonlyString is required"), mutableNumber });
}

/**
* EXPERIMENTAL
* <p>
* @param readonlyString This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public ExternalClass(final @org.jetbrains.annotations.NotNull java.lang.String readonlyString) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(readonlyString, "readonlyString is required") });
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void method() {
this.jsiiCall("method", software.amazon.jsii.NativeType.VOID);
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty() {
return this.jsiiGet("readonlyProperty", java.lang.String.class);
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() {
return this.jsiiGet("mutableProperty", java.lang.Number.class);
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
this.jsiiSet("mutableProperty", value);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package software.amazon.jsii.tests.calculator;

/**
* EXPERIMENTAL
*/
@javax.annotation.Generated(value = "jsii-pacmak")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.ExternalEnum")
public enum ExternalEnum {
/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
OPTION_A,
/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
OPTION_B,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package software.amazon.jsii.tests.calculator;

/**
* EXPERIMENTAL
*/
@javax.annotation.Generated(value = "jsii-pacmak")
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.ExternalStruct")
@software.amazon.jsii.Jsii.Proxy(ExternalStruct.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ExternalStruct extends software.amazon.jsii.JsiiSerializable {

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getReadonlyProperty();

/**
* @return a {@link Builder} of {@link ExternalStruct}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ExternalStruct}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder {
private java.lang.String readonlyProperty;

/**
* Sets the value of {@link ExternalStruct#getReadonlyProperty}
* @param readonlyProperty the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder readonlyProperty(java.lang.String readonlyProperty) {
this.readonlyProperty = readonlyProperty;
return this;
}

/**
* Builds the configured instance.
* @return a new instance of {@link ExternalStruct}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public ExternalStruct build() {
return new Jsii$Proxy(readonlyProperty);
}
}

/**
* An implementation for {@link ExternalStruct}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ExternalStruct {
private final java.lang.String readonlyProperty;

/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.readonlyProperty = this.jsiiGet("readonlyProperty", java.lang.String.class);
}

/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final java.lang.String readonlyProperty) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.readonlyProperty = java.util.Objects.requireNonNull(readonlyProperty, "readonlyProperty is required");
}

@Override
public java.lang.String getReadonlyProperty() {
return this.readonlyProperty;
}

@Override
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();

data.set("readonlyProperty", om.valueToTree(this.getReadonlyProperty()));

final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("jsii-calc.ExternalStruct"));
struct.set("data", data);

final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);

return obj;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

ExternalStruct.Jsii$Proxy that = (ExternalStruct.Jsii$Proxy) o;

return this.readonlyProperty.equals(that.readonlyProperty);
}

@Override
public int hashCode() {
int result = this.readonlyProperty.hashCode();
return result;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package software.amazon.jsii.tests.calculator;

/**
* EXPERIMENTAL
*/
@javax.annotation.Generated(value = "jsii-pacmak")
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.IExternalInterface")
@software.amazon.jsii.Jsii.Proxy(IExternalInterface.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface IExternalInterface extends software.amazon.jsii.JsiiSerializable {

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() {
return null;
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Optional
default void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
throw new UnsupportedOperationException("'void " + getClass().getCanonicalName() + "#setMutableProperty(@org.jetbrains.annotations.Nullable java.lang.Number)' is not implemented!");
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
void method();

/**
* A proxy class which represents a concrete javascript instance of this type.
*/
final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.jsii.tests.calculator.IExternalInterface {
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}

/**
* EXPERIMENTAL
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.Nullable java.lang.Number getMutableProperty() {
return this.jsiiGet("mutableProperty", java.lang.Number.class);
}

/**
* EXPERIMENTAL
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public void setMutableProperty(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
this.jsiiSet("mutableProperty", value);
}

/**
* EXPERIMENTAL
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void method() {
this.jsiiCall("method", software.amazon.jsii.NativeType.VOID);
}
}
}
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
* Just because we can.
*/
@javax.annotation.Generated(value = "jsii-pacmak")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.StructPassing")
public class StructPassing extends software.amazon.jsii.JsiiObject {

@@ -25,7 +25,7 @@ public StructPassing() {
* @param _positional This parameter is required.
* @param inputs This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull java.lang.Number howManyVarArgsDidIPass(final @org.jetbrains.annotations.NotNull java.lang.Number _positional, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct... inputs) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "howManyVarArgsDidIPass", java.lang.Number.class, java.util.stream.Stream.concat(java.util.Arrays.<Object>stream(new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required") }), java.util.Arrays.<Object>stream(inputs)).toArray(Object[]::new));
}
@@ -34,7 +34,7 @@ public StructPassing() {
* @param _positional This parameter is required.
* @param input This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct roundTrip(final @org.jetbrains.annotations.NotNull java.lang.Number _positional, final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.TopLevelStruct input) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.jsii.tests.calculator.StructPassing.class, "roundTrip", software.amazon.jsii.tests.calculator.TopLevelStruct.class, new Object[] { java.util.Objects.requireNonNull(_positional, "_positional is required"), java.util.Objects.requireNonNull(input, "input is required") });
}
Original file line number Diff line number Diff line change
@@ -57,6 +57,9 @@ jsii-calc.ExperimentalEnum=software.amazon.jsii.tests.calculator.ExperimentalEnu
jsii-calc.ExperimentalStruct=software.amazon.jsii.tests.calculator.ExperimentalStruct
jsii-calc.ExportedBaseClass=software.amazon.jsii.tests.calculator.ExportedBaseClass
jsii-calc.ExtendsInternalInterface=software.amazon.jsii.tests.calculator.ExtendsInternalInterface
jsii-calc.ExternalClass=software.amazon.jsii.tests.calculator.ExternalClass
jsii-calc.ExternalEnum=software.amazon.jsii.tests.calculator.ExternalEnum
jsii-calc.ExternalStruct=software.amazon.jsii.tests.calculator.ExternalStruct
jsii-calc.GiveMeStructs=software.amazon.jsii.tests.calculator.GiveMeStructs
jsii-calc.Greetee=software.amazon.jsii.tests.calculator.Greetee
jsii-calc.GreetingAugmenter=software.amazon.jsii.tests.calculator.GreetingAugmenter
@@ -69,6 +72,7 @@ jsii-calc.IConcreteBellRinger=software.amazon.jsii.tests.calculator.IConcreteBel
jsii-calc.IDeprecatedInterface=software.amazon.jsii.tests.calculator.IDeprecatedInterface
jsii-calc.IExperimentalInterface=software.amazon.jsii.tests.calculator.IExperimentalInterface
jsii-calc.IExtendsPrivateInterface=software.amazon.jsii.tests.calculator.IExtendsPrivateInterface
jsii-calc.IExternalInterface=software.amazon.jsii.tests.calculator.IExternalInterface
jsii-calc.IFriendlier=software.amazon.jsii.tests.calculator.IFriendlier
jsii-calc.IFriendlyRandomGenerator=software.amazon.jsii.tests.calculator.IFriendlyRandomGenerator
jsii-calc.IInterfaceImplementedByAbstractClass=software.amazon.jsii.tests.calculator.IInterfaceImplementedByAbstractClass
Original file line number Diff line number Diff line change
@@ -2407,6 +2407,120 @@ def __repr__(self) -> str:
return 'ExtendsInternalInterface(%s)' % ', '.join(k + '=' + repr(v) for k, v in self._values.items())


class ExternalClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.ExternalClass"):
"""
stability
:stability: experimental
external:
:external:: true
"""
def __init__(self, readonly_string: str, mutable_number: typing.Optional[jsii.Number]=None) -> None:
"""
:param readonly_string: -
:param mutable_number: -
stability
:stability: experimental
external:
:external:: true
"""
jsii.create(ExternalClass, self, [readonly_string, mutable_number])

@jsii.member(jsii_name="method")
def method(self) -> None:
"""
stability
:stability: experimental
external:
:external:: true
"""
return jsii.invoke(self, "method", [])

@builtins.property
@jsii.member(jsii_name="readonlyProperty")
def readonly_property(self) -> str:
"""
stability
:stability: experimental
external:
:external:: true
"""
return jsii.get(self, "readonlyProperty")

@builtins.property
@jsii.member(jsii_name="mutableProperty")
def mutable_property(self) -> typing.Optional[jsii.Number]:
"""
stability
:stability: experimental
external:
:external:: true
"""
return jsii.get(self, "mutableProperty")

@mutable_property.setter
def mutable_property(self, value: typing.Optional[jsii.Number]):
jsii.set(self, "mutableProperty", value)


@jsii.enum(jsii_type="jsii-calc.ExternalEnum")
class ExternalEnum(enum.Enum):
"""
stability
:stability: experimental
external:
:external:: true
"""
OPTION_A = "OPTION_A"
"""
stability
:stability: experimental
external:
:external:: true
"""
OPTION_B = "OPTION_B"
"""
stability
:stability: experimental
external:
:external:: true
"""

@jsii.data_type(jsii_type="jsii-calc.ExternalStruct", jsii_struct_bases=[], name_mapping={'readonly_property': 'readonlyProperty'})
class ExternalStruct():
def __init__(self, *, readonly_property: str) -> None:
"""
:param readonly_property:
stability
:stability: experimental
external:
:external:: true
"""
self._values = {
'readonly_property': readonly_property,
}

@builtins.property
def readonly_property(self) -> str:
"""
stability
:stability: experimental
external:
:external:: true
"""
return self._values.get('readonly_property')

def __eq__(self, rhs) -> bool:
return isinstance(rhs, self.__class__) and rhs._values == self._values

def __ne__(self, rhs) -> bool:
return not (rhs == self)

def __repr__(self) -> str:
return 'ExternalStruct(%s)' % ', '.join(k + '=' + repr(v) for k, v in self._values.items())


class GiveMeStructs(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.GiveMeStructs"):
"""
stability
@@ -2999,6 +3113,78 @@ def private(self, value: str) -> None:
jsii.set(self, "private", value)


@jsii.interface(jsii_type="jsii-calc.IExternalInterface")
class IExternalInterface(jsii.compat.Protocol):
"""
stability
:stability: experimental
external:
:external:: true
"""
@builtins.staticmethod
def __jsii_proxy_class__():
return _IExternalInterfaceProxy

@builtins.property
@jsii.member(jsii_name="mutableProperty")
def mutable_property(self) -> typing.Optional[jsii.Number]:
"""
stability
:stability: experimental
external:
:external:: true
"""
...

@mutable_property.setter
def mutable_property(self, value: typing.Optional[jsii.Number]):
...

@jsii.member(jsii_name="method")
def method(self) -> None:
"""
stability
:stability: experimental
external:
:external:: true
"""
...


class _IExternalInterfaceProxy():
"""
stability
:stability: experimental
external:
:external:: true
"""
__jsii_type__ = "jsii-calc.IExternalInterface"
@builtins.property
@jsii.member(jsii_name="mutableProperty")
def mutable_property(self) -> typing.Optional[jsii.Number]:
"""
stability
:stability: experimental
external:
:external:: true
"""
return jsii.get(self, "mutableProperty")

@mutable_property.setter
def mutable_property(self, value: typing.Optional[jsii.Number]):
jsii.set(self, "mutableProperty", value)

@jsii.member(jsii_name="method")
def method(self) -> None:
"""
stability
:stability: experimental
external:
:external:: true
"""
return jsii.invoke(self, "method", [])


@jsii.interface(jsii_type="jsii-calc.IFriendlier")
class IFriendlier(scope.jsii_calc_lib.IFriendly, jsii.compat.Protocol):
"""Even friendlier classes can implement this interface.
@@ -8448,6 +8634,9 @@ def next(self) -> jsii.Number:
"ExperimentalStruct",
"ExportedBaseClass",
"ExtendsInternalInterface",
"ExternalClass",
"ExternalEnum",
"ExternalStruct",
"GiveMeStructs",
"Greetee",
"GreetingAugmenter",
@@ -8460,6 +8649,7 @@ def next(self) -> jsii.Number:
"IDeprecatedInterface",
"IExperimentalInterface",
"IExtendsPrivateInterface",
"IExternalInterface",
"IFriendlier",
"IFriendlyRandomGenerator",
"IInterfaceImplementedByAbstractClass",
56 changes: 56 additions & 0 deletions packages/jsii-reflect/test/__snapshots__/jsii-tree.test.js.snap
Original file line number Diff line number Diff line change
@@ -764,6 +764,21 @@ exports[`jsii-tree --all 1`] = `
│ │ └─┬ success property (experimental)
│ │ ├── immutable
│ │ └── type: boolean
│ ├─┬ class ExternalClass (experimental)
│ │ └─┬ members
│ │ ├─┬ <initializer>(readonlyString,mutableNumber) initializer (experimental)
│ │ │ └─┬ parameters
│ │ │ ├─┬ readonlyString
│ │ │ │ └── type: string
│ │ │ └─┬ mutableNumber
│ │ │ └── type: Optional<number>
│ │ ├─┬ method() method (experimental)
│ │ │ └── returns: void
│ │ ├─┬ readonlyProperty property (experimental)
│ │ │ ├── immutable
│ │ │ └── type: string
│ │ └─┬ mutableProperty property (experimental)
│ │ └── type: Optional<number>
│ ├─┬ class GiveMeStructs (experimental)
│ │ └─┬ members
│ │ ├── <initializer>() initializer (experimental)
@@ -1908,6 +1923,12 @@ exports[`jsii-tree --all 1`] = `
│ │ ├── abstract
│ │ ├── immutable
│ │ └── type: string
│ ├─┬ interface ExternalStruct (experimental)
│ │ └─┬ members
│ │ └─┬ readonlyProperty property (experimental)
│ │ ├── abstract
│ │ ├── immutable
│ │ └── type: string
│ ├─┬ interface Greetee (experimental)
│ │ └─┬ members
│ │ └─┬ name property (experimental)
@@ -1982,6 +2003,14 @@ exports[`jsii-tree --all 1`] = `
│ │ └─┬ private property (experimental)
│ │ ├── abstract
│ │ └── type: string
│ ├─┬ interface IExternalInterface (experimental)
│ │ └─┬ members
│ │ ├─┬ method() method (experimental)
│ │ │ ├── abstract
│ │ │ └── returns: void
│ │ └─┬ mutableProperty property (experimental)
│ │ ├── abstract
│ │ └── type: Optional<number>
│ ├─┬ interface IFriendlier (experimental)
│ │ ├─┬ interfaces
│ │ │ └── IFriendly
@@ -2351,6 +2380,9 @@ exports[`jsii-tree --all 1`] = `
│ ├─┬ enum ExperimentalEnum (experimental)
│ │ ├── OPTION_A (experimental)
│ │ └── OPTION_B (experimental)
│ ├─┬ enum ExternalEnum (experimental)
│ │ ├── OPTION_A (experimental)
│ │ └── OPTION_B (experimental)
│ ├─┬ enum SingletonIntEnum (experimental)
│ │ └── SINGLETON_INT (experimental)
│ ├─┬ enum SingletonStringEnum (experimental)
@@ -2616,6 +2648,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── class EraseUndefinedHashValues
│ ├── class ExperimentalClass
│ ├── class ExportedBaseClass
│ ├── class ExternalClass
│ ├── class GiveMeStructs
│ ├── class GreetingAugmenter
│ ├── class ImplementInternalInterface
@@ -2724,6 +2757,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── interface EraseUndefinedHashValuesOptions
│ ├── interface ExperimentalStruct
│ ├── interface ExtendsInternalInterface
│ ├── interface ExternalStruct
│ ├── interface Greetee
│ ├── interface IAnonymousImplementationProvider
│ ├── interface IAnonymouslyImplementMe
@@ -2734,6 +2768,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── interface IDeprecatedInterface
│ ├── interface IExperimentalInterface
│ ├── interface IExtendsPrivateInterface
│ ├── interface IExternalInterface
│ ├─┬ interface IFriendlier
│ │ └─┬ interfaces
│ │ └── IFriendly
@@ -2795,6 +2830,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── enum AllTypesEnum
│ ├── enum DeprecatedEnum
│ ├── enum ExperimentalEnum
│ ├── enum ExternalEnum
│ ├── enum SingletonIntEnum
│ ├── enum SingletonStringEnum
│ ├── enum StableEnum
@@ -3179,6 +3215,12 @@ exports[`jsii-tree --members 1`] = `
│ │ └─┬ members
│ │ ├── <initializer>(success) initializer
│ │ └── success property
│ ├─┬ class ExternalClass
│ │ └─┬ members
│ │ ├── <initializer>(readonlyString,mutableNumber) initializer
│ │ ├── method() method
│ │ ├── readonlyProperty property
│ │ └── mutableProperty property
│ ├─┬ class GiveMeStructs
│ │ └─┬ members
│ │ ├── <initializer>() initializer
@@ -3672,6 +3714,9 @@ exports[`jsii-tree --members 1`] = `
│ │ └─┬ members
│ │ ├── boom property
│ │ └── prop property
│ ├─┬ interface ExternalStruct
│ │ └─┬ members
│ │ └── readonlyProperty property
│ ├─┬ interface Greetee
│ │ └─┬ members
│ │ └── name property
@@ -3707,6 +3752,10 @@ exports[`jsii-tree --members 1`] = `
│ │ └─┬ members
│ │ ├── moreThings property
│ │ └── private property
│ ├─┬ interface IExternalInterface
│ │ └─┬ members
│ │ ├── method() method
│ │ └── mutableProperty property
│ ├─┬ interface IFriendlier
│ │ └─┬ members
│ │ ├── farewell() method
@@ -3872,6 +3921,9 @@ exports[`jsii-tree --members 1`] = `
│ ├─┬ enum ExperimentalEnum
│ │ ├── OPTION_A
│ │ └── OPTION_B
│ ├─┬ enum ExternalEnum
│ │ ├── OPTION_A
│ │ └── OPTION_B
│ ├─┬ enum SingletonIntEnum
│ │ └── SINGLETON_INT
│ ├─┬ enum SingletonStringEnum
@@ -4066,6 +4118,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── class EraseUndefinedHashValues
│ ├── class ExperimentalClass
│ ├── class ExportedBaseClass
│ ├── class ExternalClass
│ ├── class GiveMeStructs
│ ├── class GreetingAugmenter
│ ├── class ImplementInternalInterface
@@ -4147,6 +4200,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── interface EraseUndefinedHashValuesOptions
│ ├── interface ExperimentalStruct
│ ├── interface ExtendsInternalInterface
│ ├── interface ExternalStruct
│ ├── interface Greetee
│ ├── interface IAnonymousImplementationProvider
│ ├── interface IAnonymouslyImplementMe
@@ -4157,6 +4211,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── interface IDeprecatedInterface
│ ├── interface IExperimentalInterface
│ ├── interface IExtendsPrivateInterface
│ ├── interface IExternalInterface
│ ├── interface IFriendlier
│ ├── interface IFriendlyRandomGenerator
│ ├── interface IInterfaceImplementedByAbstractClass
@@ -4203,6 +4258,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── enum AllTypesEnum
│ ├── enum DeprecatedEnum
│ ├── enum ExperimentalEnum
│ ├── enum ExternalEnum
│ ├── enum SingletonIntEnum
│ ├── enum SingletonStringEnum
│ ├── enum StableEnum
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ Array [
"jsii-calc.EraseUndefinedHashValues",
"jsii-calc.ExperimentalClass",
"jsii-calc.ExportedBaseClass",
"jsii-calc.ExternalClass",
"jsii-calc.GiveMeStructs",
"jsii-calc.GreetingAugmenter",
"jsii-calc.ImplementInternalInterface",
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///!MATCH_ERROR: Symbol is re-exported under two distinct submodules (ns1 and ns2)
///!MATCH_ERROR: Symbol is re-exported under two distinct submodules

export * as ns1 from './namespaced';
export * as ns2 from './namespaced';

0 comments on commit 7285baf

Please sign in to comment.