-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jsii): support multiple class declaration sites (#348)
Classes can have members added to them in multiple declarations. Combine all sites into a single class model.
- Loading branch information
Showing
21 changed files
with
1,415 additions
and
9,649 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
....JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.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,32 @@ | ||
using Amazon.JSII.Runtime.Deputy; | ||
|
||
namespace Amazon.JSII.Tests.CalculatorNamespace | ||
{ | ||
[JsiiClass(typeof(AugmentableClass), "jsii-calc.AugmentableClass", "[]")] | ||
public class AugmentableClass : DeputyBase | ||
{ | ||
public AugmentableClass(): base(new DeputyProps(new object[]{})) | ||
{ | ||
} | ||
|
||
protected AugmentableClass(ByRefValue reference): base(reference) | ||
{ | ||
} | ||
|
||
protected AugmentableClass(DeputyProps props): base(props) | ||
{ | ||
} | ||
|
||
[JsiiMethod("methodOne", null, "[]")] | ||
public virtual void MethodOne() | ||
{ | ||
InvokeInstanceVoidMethod(new object[]{}); | ||
} | ||
|
||
[JsiiMethod("methodTwo", null, "[]")] | ||
public virtual void MethodTwo() | ||
{ | ||
InvokeInstanceVoidMethod(new object[]{}); | ||
} | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
....jsii-calc/java/src/main/java/software/amazon/jsii/tests/calculator/AugmentableClass.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,21 @@ | ||
package software.amazon.jsii.tests.calculator; | ||
|
||
@javax.annotation.Generated(value = "jsii-pacmak") | ||
@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.AugmentableClass") | ||
public class AugmentableClass extends software.amazon.jsii.JsiiObject { | ||
protected AugmentableClass(final software.amazon.jsii.JsiiObject.InitializationMode mode) { | ||
super(mode); | ||
} | ||
public AugmentableClass() { | ||
super(software.amazon.jsii.JsiiObject.InitializationMode.Jsii); | ||
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this); | ||
} | ||
|
||
public void methodOne() { | ||
this.jsiiCall("methodOne", Void.class); | ||
} | ||
|
||
public void methodTwo() { | ||
this.jsiiCall("methodTwo", Void.class); | ||
} | ||
} |
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
Oops, something went wrong.