-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
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
Showing
34 changed files
with
1,285 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
...zon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalClass.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...azon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...on.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalStruct.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...II.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalStructProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...SII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalInterface.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...ests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalInterfaceProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[]{}); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...n.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalStruct.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
...ted.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExternalClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...cted.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExternalEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
116 changes: 116 additions & 0 deletions
116
...ed.jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/ExternalStruct.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...sii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/IExternalInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/jsii/test/negatives/neg.submodules-cannot-share-symbols.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |