diff --git a/packages/@jsii/java-runtime/pom.xml.t.js b/packages/@jsii/java-runtime/pom.xml.t.js
index 34fab4329c..2489f00498 100644
--- a/packages/@jsii/java-runtime/pom.xml.t.js
+++ b/packages/@jsii/java-runtime/pom.xml.t.js
@@ -64,7 +64,7 @@ process.stdout.write(`
[1.3.2,1.4.0)
[13.0.0,24.0-a0)
[5.8.0,5.10-a0)
- [3.12.4,4.0-a0)
+ [4.11.0,5.0-a0)
diff --git a/packages/jsii-pacmak/lib/targets/go/package.ts b/packages/jsii-pacmak/lib/targets/go/package.ts
index c06fd43143..b388401b65 100644
--- a/packages/jsii-pacmak/lib/targets/go/package.ts
+++ b/packages/jsii-pacmak/lib/targets/go/package.ts
@@ -203,7 +203,7 @@ export abstract class Package {
if (this.types.length > 0) {
const { code } = context;
- const initFile = join(this.directory, `${this.packageName}.go`);
+ const initFile = join(this.directory, `main.go`);
code.openFile(initFile);
code.line(`package ${this.packageName}`);
code.line();
@@ -238,10 +238,7 @@ export abstract class Package {
private emitTypes(context: EmitContext) {
for (const type of this.types) {
- const filePath = join(
- this.directory,
- `${this.packageName}_${type.name}.go`,
- );
+ const filePath = join(this.directory, `${type.name}.go`);
context.code.openFile(filePath);
this.emitHeader(context.code);
@@ -266,23 +263,9 @@ export abstract class Package {
return;
}
- emit.call(
- this,
- join(
- this.directory,
- `${this.packageName}_${type.name}__runtime_type_checks.go`,
- ),
- false,
- );
+ emit.call(this, join(this.directory, `${type.name}__checks.go`), false);
- emit.call(
- this,
- join(
- this.directory,
- `${this.packageName}_${type.name}__no_runtime_type_checking.go`,
- ),
- true,
- );
+ emit.call(this, join(this.directory, `${type.name}__no_checks.go`), true);
function emit(this: Package, filePath: string, forNoOp: boolean) {
code.openFile(filePath);
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
index ac1bf7249b..c6d4b04771 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.js.snap
@@ -21,16 +21,16 @@ exports[`diamond-struct-parameter.ts: / 1`] = `
┃ ┗━ 📄 Example.Test.Demo.csproj
┣━ 📁 go
┃ ┗━ 📁 testpkg
+ ┃ ┣━ 📄 Baz.go
+ ┃ ┣━ 📄 Consumer__checks.go
+ ┃ ┣━ 📄 Consumer__no_checks.go
+ ┃ ┣━ 📄 Consumer.go
+ ┃ ┣━ 📄 Foo.go
+ ┃ ┣━ 📄 FooBar.go
┃ ┣━ 📄 go.mod
┃ ┣━ 📁 jsii
┃ ┃ ┗━ 📄 jsii.go
- ┃ ┣━ 📄 testpkg_Baz.go
- ┃ ┣━ 📄 testpkg_Consumer__no_runtime_type_checking.go
- ┃ ┣━ 📄 testpkg_Consumer__runtime_type_checks.go
- ┃ ┣━ 📄 testpkg_Consumer.go
- ┃ ┣━ 📄 testpkg_Foo.go
- ┃ ┣━ 📄 testpkg_FooBar.go
- ┃ ┗━ 📄 testpkg.go
+ ┃ ┗━ 📄 main.go
┣━ 📁 java
┃ ┣━ 📄 pom.xml
┃ ┗━ 📁 src
@@ -380,77 +380,7 @@ namespace Example.Test.Demo.Internal.DependencyResolution
`;
-exports[`diamond-struct-parameter.ts: /go/testpkg/go.mod 1`] = `
-module example.test/demo/testpkg
-
-go 1.18
-
-require (
- github.com/aws/jsii-runtime-go v0.0.0
-)
-
-`;
-
-exports[`diamond-struct-parameter.ts: /go/testpkg/jsii/jsii.go 1`] = `
-// Package jsii contains the functionaility needed for jsii packages to
-// initialize their dependencies and themselves. Users should never need to use this package
-// directly. If you find you need to - please report a bug at
-// https://github.com/aws/jsii/issues/new/choose
-package jsii
-
-import (
- _ "embed"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-//go:embed testpkg-0.0.1.tgz
-var tarball []byte
-
-// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
-// The implementation is idempotent (and hence safe to be called over and over).
-func Initialize() {
- // Load this library into the kernel
- _jsii_.Load("testpkg", "0.0.1", tarball)
-}
-
-`;
-
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg.go 1`] = `
-package testpkg
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterStruct(
- "testpkg.Baz",
- reflect.TypeOf((*Baz)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "testpkg.Consumer",
- reflect.TypeOf((*Consumer)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Consumer{}
- },
- )
- _jsii_.RegisterStruct(
- "testpkg.Foo",
- reflect.TypeOf((*Foo)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "testpkg.FooBar",
- reflect.TypeOf((*FooBar)(nil)).Elem(),
- )
-}
-
-`;
-
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Baz.go 1`] = `
+exports[`diamond-struct-parameter.ts: /go/testpkg/Baz.go 1`] = `
// testpkg
package testpkg
@@ -464,7 +394,7 @@ type Baz struct {
`;
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer.go 1`] = `
+exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer.go 1`] = `
// testpkg
package testpkg
@@ -497,22 +427,7 @@ func Consumer_ConsumeBaz(baz *Baz) {
`;
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer__no_runtime_type_checking.go 1`] = `
-//go:build no_runtime_type_checking
-
-// testpkg
-package testpkg
-
-// Building without runtime type checking enabled, so all the below just return nil
-
-func validateConsumer_ConsumeBazParameters(baz *Baz) error {
- return nil
-}
-
-
-`;
-
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Consumer__runtime_type_checks.go 1`] = `
+exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer__checks.go 1`] = `
//go:build !no_runtime_type_checking
// testpkg
@@ -538,7 +453,22 @@ func validateConsumer_ConsumeBazParameters(baz *Baz) error {
`;
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_Foo.go 1`] = `
+exports[`diamond-struct-parameter.ts: /go/testpkg/Consumer__no_checks.go 1`] = `
+//go:build no_runtime_type_checking
+
+// testpkg
+package testpkg
+
+// Building without runtime type checking enabled, so all the below just return nil
+
+func validateConsumer_ConsumeBazParameters(baz *Baz) error {
+ return nil
+}
+
+
+`;
+
+exports[`diamond-struct-parameter.ts: /go/testpkg/Foo.go 1`] = `
// testpkg
package testpkg
@@ -550,7 +480,7 @@ type Foo struct {
`;
-exports[`diamond-struct-parameter.ts: /go/testpkg/testpkg_FooBar.go 1`] = `
+exports[`diamond-struct-parameter.ts: /go/testpkg/FooBar.go 1`] = `
// testpkg
package testpkg
@@ -561,6 +491,76 @@ type FooBar struct {
}
+`;
+
+exports[`diamond-struct-parameter.ts: /go/testpkg/go.mod 1`] = `
+module example.test/demo/testpkg
+
+go 1.18
+
+require (
+ github.com/aws/jsii-runtime-go v0.0.0
+)
+
+`;
+
+exports[`diamond-struct-parameter.ts: /go/testpkg/jsii/jsii.go 1`] = `
+// Package jsii contains the functionaility needed for jsii packages to
+// initialize their dependencies and themselves. Users should never need to use this package
+// directly. If you find you need to - please report a bug at
+// https://github.com/aws/jsii/issues/new/choose
+package jsii
+
+import (
+ _ "embed"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+//go:embed testpkg-0.0.1.tgz
+var tarball []byte
+
+// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
+// The implementation is idempotent (and hence safe to be called over and over).
+func Initialize() {
+ // Load this library into the kernel
+ _jsii_.Load("testpkg", "0.0.1", tarball)
+}
+
+`;
+
+exports[`diamond-struct-parameter.ts: /go/testpkg/main.go 1`] = `
+package testpkg
+
+import (
+ "reflect"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+func init() {
+ _jsii_.RegisterStruct(
+ "testpkg.Baz",
+ reflect.TypeOf((*Baz)(nil)).Elem(),
+ )
+ _jsii_.RegisterClass(
+ "testpkg.Consumer",
+ reflect.TypeOf((*Consumer)(nil)).Elem(),
+ nil, // no members
+ func() interface{} {
+ return &jsiiProxy_Consumer{}
+ },
+ )
+ _jsii_.RegisterStruct(
+ "testpkg.Foo",
+ reflect.TypeOf((*Foo)(nil)).Elem(),
+ )
+ _jsii_.RegisterStruct(
+ "testpkg.FooBar",
+ reflect.TypeOf((*FooBar)(nil)).Elem(),
+ )
+}
+
`;
exports[`diamond-struct-parameter.ts: /java/pom.xml 1`] = `
@@ -1560,13 +1560,13 @@ exports[`nested-types.ts: / 1`] = `
┃ ┣━ 📄 go.mod
┃ ┣━ 📁 jsii
┃ ┃ ┗━ 📄 jsii.go
- ┃ ┣━ 📄 testpkg_Namespace1_Foo.go
- ┃ ┣━ 📄 testpkg_Namespace1_IBar.go
- ┃ ┣━ 📄 testpkg_Namespace1.go
- ┃ ┣━ 📄 testpkg_Namespace2_Foo_Final.go
- ┃ ┣━ 📄 testpkg_Namespace2_Foo.go
- ┃ ┣━ 📄 testpkg_Namespace2.go
- ┃ ┗━ 📄 testpkg.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┣━ 📄 Namespace1_Foo.go
+ ┃ ┣━ 📄 Namespace1_IBar.go
+ ┃ ┣━ 📄 Namespace1.go
+ ┃ ┣━ 📄 Namespace2_Foo_Final.go
+ ┃ ┣━ 📄 Namespace2_Foo.go
+ ┃ ┗━ 📄 Namespace2.go
┣━ 📁 java
┃ ┣━ 📄 pom.xml
┃ ┗━ 📁 src
@@ -1852,110 +1852,7 @@ namespace Example.Test.Demo
`;
-exports[`nested-types.ts: /go/testpkg/go.mod 1`] = `
-module example.test/demo/testpkg
-
-go 1.18
-
-require (
- github.com/aws/jsii-runtime-go v0.0.0
-)
-
-`;
-
-exports[`nested-types.ts: /go/testpkg/jsii/jsii.go 1`] = `
-// Package jsii contains the functionaility needed for jsii packages to
-// initialize their dependencies and themselves. Users should never need to use this package
-// directly. If you find you need to - please report a bug at
-// https://github.com/aws/jsii/issues/new/choose
-package jsii
-
-import (
- _ "embed"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-//go:embed testpkg-0.0.1.tgz
-var tarball []byte
-
-// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
-// The implementation is idempotent (and hence safe to be called over and over).
-func Initialize() {
- // Load this library into the kernel
- _jsii_.Load("testpkg", "0.0.1", tarball)
-}
-
-`;
-
-exports[`nested-types.ts: /go/testpkg/testpkg.go 1`] = `
-package testpkg
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "testpkg.Namespace1",
- reflect.TypeOf((*Namespace1)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- },
- func() interface{} {
- return &jsiiProxy_Namespace1{}
- },
- )
- _jsii_.RegisterStruct(
- "testpkg.Namespace1.Foo",
- reflect.TypeOf((*Namespace1_Foo)(nil)).Elem(),
- )
- _jsii_.RegisterInterface(
- "testpkg.Namespace1.IBar",
- reflect.TypeOf((*Namespace1_IBar)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"},
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- },
- func() interface{} {
- return &jsiiProxy_Namespace1_IBar{}
- },
- )
- _jsii_.RegisterClass(
- "testpkg.Namespace2",
- reflect.TypeOf((*Namespace2)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- },
- func() interface{} {
- return &jsiiProxy_Namespace2{}
- },
- )
- _jsii_.RegisterEnum(
- "testpkg.Namespace2.Foo",
- reflect.TypeOf((*Namespace2_Foo)(nil)).Elem(),
- map[string]interface{}{
- "BAR": Namespace2_Foo_BAR,
- "BAZ": Namespace2_Foo_BAZ,
- },
- )
- _jsii_.RegisterClass(
- "testpkg.Namespace2.Foo.Final",
- reflect.TypeOf((*Namespace2_Foo_Final)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "done", GoGetter: "Done"},
- },
- func() interface{} {
- return &jsiiProxy_Namespace2_Foo_Final{}
- },
- )
-}
-
-`;
-
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace1.go 1`] = `
// testpkg
package testpkg
@@ -2008,7 +1905,7 @@ func (n *jsiiProxy_Namespace1) Foo() {
`;
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1_Foo.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace1_Foo.go 1`] = `
// testpkg
package testpkg
@@ -2020,7 +1917,7 @@ type Namespace1_Foo struct {
`;
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace1_IBar.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace1_IBar.go 1`] = `
// testpkg
package testpkg
@@ -2059,7 +1956,7 @@ func (j *jsiiProxy_Namespace1_IBar) Bar() *string {
`;
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace2.go 1`] = `
// testpkg
package testpkg
@@ -2112,7 +2009,7 @@ func (n *jsiiProxy_Namespace2) Foo() {
`;
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2_Foo.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace2_Foo.go 1`] = `
// testpkg
package testpkg
@@ -2127,7 +2024,7 @@ const (
`;
-exports[`nested-types.ts: /go/testpkg/testpkg_Namespace2_Foo_Final.go 1`] = `
+exports[`nested-types.ts: /go/testpkg/Namespace2_Foo_Final.go 1`] = `
// testpkg
package testpkg
@@ -2181,6 +2078,109 @@ func NewNamespace2_Foo_Final_Override(n Namespace2_Foo_Final) {
}
+`;
+
+exports[`nested-types.ts: /go/testpkg/go.mod 1`] = `
+module example.test/demo/testpkg
+
+go 1.18
+
+require (
+ github.com/aws/jsii-runtime-go v0.0.0
+)
+
+`;
+
+exports[`nested-types.ts: /go/testpkg/jsii/jsii.go 1`] = `
+// Package jsii contains the functionaility needed for jsii packages to
+// initialize their dependencies and themselves. Users should never need to use this package
+// directly. If you find you need to - please report a bug at
+// https://github.com/aws/jsii/issues/new/choose
+package jsii
+
+import (
+ _ "embed"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+//go:embed testpkg-0.0.1.tgz
+var tarball []byte
+
+// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
+// The implementation is idempotent (and hence safe to be called over and over).
+func Initialize() {
+ // Load this library into the kernel
+ _jsii_.Load("testpkg", "0.0.1", tarball)
+}
+
+`;
+
+exports[`nested-types.ts: /go/testpkg/main.go 1`] = `
+package testpkg
+
+import (
+ "reflect"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+func init() {
+ _jsii_.RegisterClass(
+ "testpkg.Namespace1",
+ reflect.TypeOf((*Namespace1)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Namespace1{}
+ },
+ )
+ _jsii_.RegisterStruct(
+ "testpkg.Namespace1.Foo",
+ reflect.TypeOf((*Namespace1_Foo)(nil)).Elem(),
+ )
+ _jsii_.RegisterInterface(
+ "testpkg.Namespace1.IBar",
+ reflect.TypeOf((*Namespace1_IBar)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"},
+ _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Namespace1_IBar{}
+ },
+ )
+ _jsii_.RegisterClass(
+ "testpkg.Namespace2",
+ reflect.TypeOf((*Namespace2)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Namespace2{}
+ },
+ )
+ _jsii_.RegisterEnum(
+ "testpkg.Namespace2.Foo",
+ reflect.TypeOf((*Namespace2_Foo)(nil)).Elem(),
+ map[string]interface{}{
+ "BAR": Namespace2_Foo_BAR,
+ "BAZ": Namespace2_Foo_BAZ,
+ },
+ )
+ _jsii_.RegisterClass(
+ "testpkg.Namespace2.Foo.Final",
+ reflect.TypeOf((*Namespace2_Foo_Final)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberProperty{JsiiProperty: "done", GoGetter: "Done"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Namespace2_Foo_Final{}
+ },
+ )
+}
+
`;
exports[`nested-types.ts: /java/pom.xml 1`] = `
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap
index 83d963d183..e0ee5d1573 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.js.snap
@@ -4,22 +4,116 @@ exports[`Generated code for "@scope/jsii-calc-base": / 1`] = `
┗━ 📁 go
┗━ 📁 jcb
+ ┣━ 📄 Base.go
+ ┣━ 📄 BaseProps.go
┣━ 📄 go.mod
+ ┣━ 📄 IBaseInterface.go
┣━ 📁 internal
┃ ┗━ 📄 types.go
- ┣━ 📄 jcb_Base.go
- ┣━ 📄 jcb_BaseProps.go
- ┣━ 📄 jcb_IBaseInterface.go
- ┣━ 📄 jcb_StaticConsumer.go
- ┣━ 📄 jcb.go
┣━ 📁 jsii
┃ ┣━ 📄 jsii.go
┃ ┗━ 📄 scope-jsii-calc-base-0.0.0.tgz
┣━ 📄 LICENSE
+ ┣━ 📄 main.go
┣━ 📄 NOTICE
+ ┣━ 📄 StaticConsumer.go
┗━ 📄 version
`;
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/Base.go 1`] = `
+// An example direct dependency for jsii-calc.
+package jcb
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jcb/jsii"
+)
+
+// A base class.
+type Base interface {
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ TypeName() interface{}
+}
+
+// The jsii proxy struct for Base
+type jsiiProxy_Base struct {
+ _ byte // padding
+}
+
+func NewBase_Override(b Base) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "@scope/jsii-calc-base.Base",
+ nil, // no parameters
+ b,
+ )
+}
+
+func (b *jsiiProxy_Base) TypeName() interface{} {
+ var returns interface{}
+
+ _jsii_.Invoke(
+ b,
+ "typeName",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/BaseProps.go 1`] = `
+// An example direct dependency for jsii-calc.
+package jcb
+
+import (
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
+)
+
+type BaseProps struct {
+ Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\`
+ Bar *string \`field:"required" json:"bar" yaml:"bar"\`
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/IBaseInterface.go 1`] = `
+// An example direct dependency for jsii-calc.
+package jcb
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+
+ "github.com/aws/jsii/jsii-calc/go/jcb/internal"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
+)
+
+type IBaseInterface interface {
+ scopejsiicalcbaseofbase.IVeryBaseInterface
+ Bar()
+}
+
+// The jsii proxy for IBaseInterface
+type jsiiProxy_IBaseInterface struct {
+ internal.Type__scopejsiicalcbaseofbaseIVeryBaseInterface
+}
+
+func (i *jsiiProxy_IBaseInterface) Bar() {
+ _jsii_.InvokeVoid(
+ i,
+ "bar",
+ nil, // no parameters
+ )
+}
+
+
+`;
+
exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/LICENSE 1`] = `
Apache License
@@ -231,171 +325,7 @@ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
`;
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/go.mod 1`] = `
-module github.com/aws/jsii/jsii-calc/go/jcb
-
-go 1.18
-
-require (
- github.com/aws/jsii-runtime-go v0.0.0
- github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1
-)
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/internal/types.go 1`] = `
-package internal
-import (
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
-)
-type Type__scopejsiicalcbaseofbaseIVeryBaseInterface = scopejsiicalcbaseofbase.IVeryBaseInterface
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb.go 1`] = `
-package jcb
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "@scope/jsii-calc-base.Base",
- reflect.TypeOf((*Base)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- },
- func() interface{} {
- return &jsiiProxy_Base{}
- },
- )
- _jsii_.RegisterStruct(
- "@scope/jsii-calc-base.BaseProps",
- reflect.TypeOf((*BaseProps)(nil)).Elem(),
- )
- _jsii_.RegisterInterface(
- "@scope/jsii-calc-base.IBaseInterface",
- reflect.TypeOf((*IBaseInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"},
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- },
- func() interface{} {
- j := jsiiProxy_IBaseInterface{}
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalcbaseofbaseIVeryBaseInterface)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-base.StaticConsumer",
- reflect.TypeOf((*StaticConsumer)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_StaticConsumer{}
- },
- )
-}
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_Base.go 1`] = `
-// An example direct dependency for jsii-calc.
-package jcb
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/jcb/jsii"
-)
-
-// A base class.
-type Base interface {
- // Returns: the name of the class (to verify native type names are created for derived classes).
- TypeName() interface{}
-}
-
-// The jsii proxy struct for Base
-type jsiiProxy_Base struct {
- _ byte // padding
-}
-
-func NewBase_Override(b Base) {
- _init_.Initialize()
-
- _jsii_.Create(
- "@scope/jsii-calc-base.Base",
- nil, // no parameters
- b,
- )
-}
-
-func (b *jsiiProxy_Base) TypeName() interface{} {
- var returns interface{}
-
- _jsii_.Invoke(
- b,
- "typeName",
- nil, // no parameters
- &returns,
- )
-
- return returns
-}
-
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_BaseProps.go 1`] = `
-// An example direct dependency for jsii-calc.
-package jcb
-
-import (
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
-)
-
-type BaseProps struct {
- Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\`
- Bar *string \`field:"required" json:"bar" yaml:"bar"\`
-}
-
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_IBaseInterface.go 1`] = `
-// An example direct dependency for jsii-calc.
-package jcb
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-
- "github.com/aws/jsii/jsii-calc/go/jcb/internal"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
-)
-
-type IBaseInterface interface {
- scopejsiicalcbaseofbase.IVeryBaseInterface
- Bar()
-}
-
-// The jsii proxy for IBaseInterface
-type jsiiProxy_IBaseInterface struct {
- internal.Type__scopejsiicalcbaseofbaseIVeryBaseInterface
-}
-
-func (i *jsiiProxy_IBaseInterface) Bar() {
- _jsii_.InvokeVoid(
- i,
- "bar",
- nil, // no parameters
- )
-}
-
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jcb_StaticConsumer.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/StaticConsumer.go 1`] = `
// An example direct dependency for jsii-calc.
package jcb
@@ -453,6 +383,27 @@ func StaticConsumer_Consume(args ...interface{}) {
}
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/go.mod 1`] = `
+module github.com/aws/jsii/jsii-calc/go/jcb
+
+go 1.18
+
+require (
+ github.com/aws/jsii-runtime-go v0.0.0
+ github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1
+)
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/internal/types.go 1`] = `
+package internal
+import (
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
+)
+type Type__scopejsiicalcbaseofbaseIVeryBaseInterface = scopejsiicalcbaseofbase.IVeryBaseInterface
+
`;
exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jsii/jsii.go 1`] = `
@@ -487,6 +438,55 @@ func Initialize() {
exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/jsii/scope-jsii-calc-base-0.0.0.tgz 1`] = `go/jcb/jsii/scope-jsii-calc-base-0.0.0.tgz is a tarball`;
+exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/main.go 1`] = `
+package jcb
+
+import (
+ "reflect"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+func init() {
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-base.Base",
+ reflect.TypeOf((*Base)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Base{}
+ },
+ )
+ _jsii_.RegisterStruct(
+ "@scope/jsii-calc-base.BaseProps",
+ reflect.TypeOf((*BaseProps)(nil)).Elem(),
+ )
+ _jsii_.RegisterInterface(
+ "@scope/jsii-calc-base.IBaseInterface",
+ reflect.TypeOf((*IBaseInterface)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"},
+ _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
+ },
+ func() interface{} {
+ j := jsiiProxy_IBaseInterface{}
+ _jsii_.InitJsiiProxy(&j.Type__scopejsiicalcbaseofbaseIVeryBaseInterface)
+ return &j
+ },
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-base.StaticConsumer",
+ reflect.TypeOf((*StaticConsumer)(nil)).Elem(),
+ nil, // no members
+ func() interface{} {
+ return &jsiiProxy_StaticConsumer{}
+ },
+ )
+}
+
+`;
+
exports[`Generated code for "@scope/jsii-calc-base": /go/jcb/version 1`] = `
0.0.0
@@ -502,17 +502,45 @@ exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = `
┗━ 📁 go
┗━ 📁 scopejsiicalcbaseofbase
┣━ 📄 go.mod
+ ┣━ 📄 IVeryBaseInterface.go
┣━ 📁 jsii
┃ ┣━ 📄 jsii.go
┃ ┗━ 📄 scope-jsii-calc-base-of-base-2.1.1.tgz
┣━ 📄 LICENSE
+ ┣━ 📄 main.go
┣━ 📄 NOTICE
- ┣━ 📄 scopejsiicalcbaseofbase_IVeryBaseInterface.go
- ┣━ 📄 scopejsiicalcbaseofbase_StaticConsumer.go
- ┣━ 📄 scopejsiicalcbaseofbase_Very.go
- ┣━ 📄 scopejsiicalcbaseofbase_VeryBaseProps.go
- ┣━ 📄 scopejsiicalcbaseofbase.go
- ┗━ 📄 version
+ ┣━ 📄 StaticConsumer.go
+ ┣━ 📄 version
+ ┣━ 📄 Very.go
+ ┗━ 📄 VeryBaseProps.go
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/IVeryBaseInterface.go 1`] = `
+// An example transitive dependency for jsii-calc.
+package scopejsiicalcbaseofbase
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+type IVeryBaseInterface interface {
+ Foo()
+}
+
+// The jsii proxy for IVeryBaseInterface
+type jsiiProxy_IVeryBaseInterface struct {
+ _ byte // padding
+}
+
+func (i *jsiiProxy_IVeryBaseInterface) Foo() {
+ _jsii_.InvokeVoid(
+ i,
+ "foo",
+ nil, // no parameters
+ )
+}
+
+
`;
exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/LICENSE 1`] = `
@@ -726,119 +754,7 @@ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
`;
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/go.mod 1`] = `
-module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2
-
-go 1.18
-
-require (
- github.com/aws/jsii-runtime-go v0.0.0
-)
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = `
-// Package jsii contains the functionaility needed for jsii packages to
-// initialize their dependencies and themselves. Users should never need to use this package
-// directly. If you find you need to - please report a bug at
-// https://github.com/aws/jsii/issues/new/choose
-package jsii
-
-import (
- _ "embed"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-//go:embed scope-jsii-calc-base-of-base-2.1.1.tgz
-var tarball []byte
-
-// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
-// The implementation is idempotent (and hence safe to be called over and over).
-func Initialize() {
- // Load this library into the kernel
- _jsii_.Load("@scope/jsii-calc-base-of-base", "2.1.1", tarball)
-}
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`;
-
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase.go 1`] = `
-package scopejsiicalcbaseofbase
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterInterface(
- "@scope/jsii-calc-base-of-base.IVeryBaseInterface",
- reflect.TypeOf((*IVeryBaseInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- },
- func() interface{} {
- return &jsiiProxy_IVeryBaseInterface{}
- },
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-base-of-base.StaticConsumer",
- reflect.TypeOf((*StaticConsumer)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_StaticConsumer{}
- },
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-base-of-base.Very",
- reflect.TypeOf((*Very)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hey", GoMethod: "Hey"},
- },
- func() interface{} {
- return &jsiiProxy_Very{}
- },
- )
- _jsii_.RegisterStruct(
- "@scope/jsii-calc-base-of-base.VeryBaseProps",
- reflect.TypeOf((*VeryBaseProps)(nil)).Elem(),
- )
-}
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_IVeryBaseInterface.go 1`] = `
-// An example transitive dependency for jsii-calc.
-package scopejsiicalcbaseofbase
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-type IVeryBaseInterface interface {
- Foo()
-}
-
-// The jsii proxy for IVeryBaseInterface
-type jsiiProxy_IVeryBaseInterface struct {
- _ byte // padding
-}
-
-func (i *jsiiProxy_IVeryBaseInterface) Foo() {
- _jsii_.InvokeVoid(
- i,
- "foo",
- nil, // no parameters
- )
-}
-
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_StaticConsumer.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/StaticConsumer.go 1`] = `
// An example transitive dependency for jsii-calc.
package scopejsiicalcbaseofbase
@@ -873,7 +789,7 @@ func StaticConsumer_Consume(_args ...interface{}) {
`;
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_Very.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/Very.go 1`] = `
// An example transitive dependency for jsii-calc.
package scopejsiicalcbaseofbase
@@ -936,7 +852,7 @@ func (v *jsiiProxy_Very) Hey() *float64 {
`;
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/scopejsiicalcbaseofbase_VeryBaseProps.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/VeryBaseProps.go 1`] = `
// An example transitive dependency for jsii-calc.
package scopejsiicalcbaseofbase
@@ -948,74 +864,389 @@ type VeryBaseProps struct {
`;
-exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/version 1`] = `
-2.1.1
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/go.mod 1`] = `
+module github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2
-`;
+go 1.18
-exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = `
-
-┗━ 🕳 There is nothing here
-`;
+require (
+ github.com/aws/jsii-runtime-go v0.0.0
+)
-exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = `
-
- ┗━ 📁 go
- ┗━ 📁 scopejsiicalclib
- ┣━ 📁 customsubmodulename
- ┃ ┣━ 📄 customsubmodulename_IReflectable.go
- ┃ ┣━ 📄 customsubmodulename_NestingClass_NestedClass.go
- ┃ ┣━ 📄 customsubmodulename_NestingClass_NestedStruct.go
- ┃ ┣━ 📄 customsubmodulename_NestingClass.go
- ┃ ┣━ 📄 customsubmodulename_ReflectableEntry.go
- ┃ ┣━ 📄 customsubmodulename_Reflector.go
- ┃ ┣━ 📄 customsubmodulename.go
- ┃ ┗━ 📄 README.md
- ┣━ 📁 deprecationremoval
- ┃ ┣━ 📄 deprecationremoval_IInterface.go
- ┃ ┣━ 📄 deprecationremoval_InterfaceFactory.go
- ┃ ┗━ 📄 deprecationremoval.go
- ┣━ 📄 go.mod
- ┣━ 📁 internal
- ┃ ┗━ 📄 types.go
- ┣━ 📁 jsii
- ┃ ┣━ 📄 jsii.go
- ┃ ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz
- ┣━ 📄 LICENSE
- ┣━ 📄 NOTICE
- ┣━ 📄 scopejsiicalclib_BaseFor2647.go
- ┣━ 📄 scopejsiicalclib_DiamondLeft.go
- ┣━ 📄 scopejsiicalclib_DiamondRight.go
- ┣━ 📄 scopejsiicalclib_EnumFromScopedModule.go
- ┣━ 📄 scopejsiicalclib_IDoublable.go
- ┣━ 📄 scopejsiicalclib_IFriendly.go
- ┣━ 📄 scopejsiicalclib_IThreeLevelsInterface.go
- ┣━ 📄 scopejsiicalclib_MyFirstStruct.go
- ┣━ 📄 scopejsiicalclib_Number.go
- ┣━ 📄 scopejsiicalclib_NumericValue.go
- ┣━ 📄 scopejsiicalclib_Operation.go
- ┣━ 📄 scopejsiicalclib_StructWithOnlyOptionals.go
- ┣━ 📄 scopejsiicalclib.go
- ┗━ 📄 version
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/LICENSE 1`] = `
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/jsii.go 1`] = `
+// Package jsii contains the functionaility needed for jsii packages to
+// initialize their dependencies and themselves. Users should never need to use this package
+// directly. If you find you need to - please report a bug at
+// https://github.com/aws/jsii/issues/new/choose
+package jsii
- 1. Definitions.
+import (
+ _ "embed"
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
+//go:embed scope-jsii-calc-base-of-base-2.1.1.tgz
+var tarball []byte
- "Legal Entity" shall mean the union of the acting entity and all
+// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
+// The implementation is idempotent (and hence safe to be called over and over).
+func Initialize() {
+ // Load this library into the kernel
+ _jsii_.Load("@scope/jsii-calc-base-of-base", "2.1.1", tarball)
+}
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `go/scopejsiicalcbaseofbase/jsii/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`;
+
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/main.go 1`] = `
+package scopejsiicalcbaseofbase
+
+import (
+ "reflect"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+func init() {
+ _jsii_.RegisterInterface(
+ "@scope/jsii-calc-base-of-base.IVeryBaseInterface",
+ reflect.TypeOf((*IVeryBaseInterface)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
+ },
+ func() interface{} {
+ return &jsiiProxy_IVeryBaseInterface{}
+ },
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-base-of-base.StaticConsumer",
+ reflect.TypeOf((*StaticConsumer)(nil)).Elem(),
+ nil, // no members
+ func() interface{} {
+ return &jsiiProxy_StaticConsumer{}
+ },
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-base-of-base.Very",
+ reflect.TypeOf((*Very)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "hey", GoMethod: "Hey"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Very{}
+ },
+ )
+ _jsii_.RegisterStruct(
+ "@scope/jsii-calc-base-of-base.VeryBaseProps",
+ reflect.TypeOf((*VeryBaseProps)(nil)).Elem(),
+ )
+}
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base-of-base": /go/scopejsiicalcbaseofbase/version 1`] = `
+2.1.1
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = `
+
+┗━ 🕳 There is nothing here
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = `
+
+ ┗━ 📁 go
+ ┗━ 📁 scopejsiicalclib
+ ┣━ 📄 BaseFor2647.go
+ ┣━ 📁 customsubmodulename
+ ┃ ┣━ 📄 IReflectable.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┣━ 📄 NestingClass_NestedClass.go
+ ┃ ┣━ 📄 NestingClass_NestedStruct.go
+ ┃ ┣━ 📄 NestingClass.go
+ ┃ ┣━ 📄 README.md
+ ┃ ┣━ 📄 ReflectableEntry.go
+ ┃ ┗━ 📄 Reflector.go
+ ┣━ 📁 deprecationremoval
+ ┃ ┣━ 📄 IInterface.go
+ ┃ ┣━ 📄 InterfaceFactory.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📄 DiamondLeft.go
+ ┣━ 📄 DiamondRight.go
+ ┣━ 📄 EnumFromScopedModule.go
+ ┣━ 📄 go.mod
+ ┣━ 📄 IDoublable.go
+ ┣━ 📄 IFriendly.go
+ ┣━ 📁 internal
+ ┃ ┗━ 📄 types.go
+ ┣━ 📄 IThreeLevelsInterface.go
+ ┣━ 📁 jsii
+ ┃ ┣━ 📄 jsii.go
+ ┃ ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz
+ ┣━ 📄 LICENSE
+ ┣━ 📄 main.go
+ ┣━ 📄 MyFirstStruct.go
+ ┣━ 📄 NOTICE
+ ┣━ 📄 Number.go
+ ┣━ 📄 NumericValue.go
+ ┣━ 📄 Operation.go
+ ┣━ 📄 StructWithOnlyOptionals.go
+ ┗━ 📄 version
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+
+ "github.com/aws/jsii/jsii-calc/go/jcb"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
+)
+
+// A base class for testing #2647.
+//
+// The method \`foo\` has a parameter that uses a type
+// from a dependent module. Since Go "reimplments" this method, it will also need
+// to include an "import" statement for the calc-base module.
+// See: https://github.com/aws/jsii/issues/2647
+//
+// Deprecated.
+type BaseFor2647 interface {
+ // Deprecated.
+ Foo(obj jcb.IBaseInterface)
+}
+
+// The jsii proxy struct for BaseFor2647
+type jsiiProxy_BaseFor2647 struct {
+ _ byte // padding
+}
+
+// Deprecated.
+func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 {
+ _init_.Initialize()
+
+ j := jsiiProxy_BaseFor2647{}
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.BaseFor2647",
+ []interface{}{very},
+ &j,
+ )
+
+ return &j
+}
+
+// Deprecated.
+func NewBaseFor2647_Override(b BaseFor2647, very scopejsiicalcbaseofbase.Very) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.BaseFor2647",
+ []interface{}{very},
+ b,
+ )
+}
+
+func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) {
+ _jsii_.InvokeVoid(
+ b,
+ "foo",
+ []interface{}{obj},
+ )
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/DiamondLeft.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+
+// Deprecated.
+type DiamondLeft struct {
+ // Deprecated.
+ HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\`
+ // Deprecated.
+ Left *float64 \`field:"optional" json:"left" yaml:"left"\`
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/DiamondRight.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+
+// Deprecated.
+type DiamondRight struct {
+ // Deprecated.
+ HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\`
+ // Deprecated.
+ Right *bool \`field:"optional" json:"right" yaml:"right"\`
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/EnumFromScopedModule.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+
+// Check that enums from \\@scoped packages can be references.
+//
+// See awslabs/jsii#138.
+// Deprecated.
+type EnumFromScopedModule string
+
+const (
+ // Deprecated.
+ EnumFromScopedModule_VALUE1 EnumFromScopedModule = "VALUE1"
+ // Deprecated.
+ EnumFromScopedModule_VALUE2 EnumFromScopedModule = "VALUE2"
+)
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IDoublable.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+// The general contract for a concrete number.
+// Deprecated.
+type IDoublable interface {
+ // Deprecated.
+ DoubleValue() *float64
+}
+
+// The jsii proxy for IDoublable
+type jsiiProxy_IDoublable struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_IDoublable) DoubleValue() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "doubleValue",
+ &returns,
+ )
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IFriendly.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+// Applies to classes that are considered friendly.
+//
+// These classes can be greeted with
+// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner.
+// Deprecated.
+type IFriendly interface {
+ // Say hello!
+ // Deprecated.
+ Hello() *string
+}
+
+// The jsii proxy for IFriendly
+type jsiiProxy_IFriendly struct {
+ _ byte // padding
+}
+
+func (i *jsiiProxy_IFriendly) Hello() *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ i,
+ "hello",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/IThreeLevelsInterface.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+
+ "github.com/aws/jsii/jsii-calc/go/jcb"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal"
+)
+
+// Interface that inherits from packages 2 levels up the tree.
+//
+// Their presence validates that .NET/Java/jsii-reflect can track all fields
+// far enough up the tree.
+// Deprecated.
+type IThreeLevelsInterface interface {
+ jcb.IBaseInterface
+ // Deprecated.
+ Baz()
+}
+
+// The jsii proxy for IThreeLevelsInterface
+type jsiiProxy_IThreeLevelsInterface struct {
+ internal.Type__jcbIBaseInterface
+}
+
+func (i *jsiiProxy_IThreeLevelsInterface) Baz() {
+ _jsii_.InvokeVoid(
+ i,
+ "baz",
+ nil, // no parameters
+ )
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/LICENSE 1`] = `
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
@@ -1204,189 +1435,438 @@ exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib
limitations under the License.
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NOTICE 1`] = `
-jsii
-Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/MyFirstStruct.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
-`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/README.md 1`] = `
-# Submodule Readme
+// This is the first struct we have created in jsii.
+// Deprecated.
+type MyFirstStruct struct {
+ // An awesome number value.
+ // Deprecated.
+ Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\`
+ // A string value.
+ // Deprecated.
+ Astring *string \`field:"required" json:"astring" yaml:"astring"\`
+ // Deprecated.
+ FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\`
+}
-This is a submodule readme.
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename.go 1`] = `
-package customsubmodulename
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterInterface(
- "@scope/jsii-calc-lib.submodule.IReflectable",
- reflect.TypeOf((*IReflectable)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"},
- },
- func() interface{} {
- return &jsiiProxy_IReflectable{}
- },
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-lib.submodule.NestingClass",
- reflect.TypeOf((*NestingClass)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_NestingClass{}
- },
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
- reflect.TypeOf((*NestingClass_NestedClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- return &jsiiProxy_NestingClass_NestedClass{}
- },
- )
- _jsii_.RegisterStruct(
- "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct",
- reflect.TypeOf((*NestingClass_NestedStruct)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "@scope/jsii-calc-lib.submodule.ReflectableEntry",
- reflect.TypeOf((*ReflectableEntry)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "@scope/jsii-calc-lib.submodule.Reflector",
- reflect.TypeOf((*Reflector)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "asMap", GoMethod: "AsMap"},
- },
- func() interface{} {
- return &jsiiProxy_Reflector{}
- },
- )
-}
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NOTICE 1`] = `
+jsii
+Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_IReflectable.go 1`] = `
-package customsubmodulename
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
)
+// Represents a concrete number.
// Deprecated.
-type IReflectable interface {
+type Number interface {
+ NumericValue
+ IDoublable
+ // The number multiplied by 2.
// Deprecated.
- Entries() *[]*ReflectableEntry
+ DoubleValue() *float64
+ // The number.
+ // Deprecated.
+ Value() *float64
+ // String representation of the value.
+ // Deprecated.
+ ToString() *string
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ // Deprecated.
+ TypeName() interface{}
}
-// The jsii proxy for IReflectable
-type jsiiProxy_IReflectable struct {
- _ byte // padding
+// The jsii proxy struct for Number
+type jsiiProxy_Number struct {
+ jsiiProxy_NumericValue
+ jsiiProxy_IDoublable
}
-func (j *jsiiProxy_IReflectable) Entries() *[]*ReflectableEntry {
- var returns *[]*ReflectableEntry
+func (j *jsiiProxy_Number) DoubleValue() *float64 {
+ var returns *float64
_jsii_.Get(
j,
- "entries",
+ "doubleValue",
&returns,
)
return returns
}
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass.go 1`] = `
-package customsubmodulename
-
-
-// This class is here to show we can use nested classes across module boundaries.
-// Deprecated.
-type NestingClass interface {
-}
-
-// The jsii proxy struct for NestingClass
-type jsiiProxy_NestingClass struct {
- _ byte // padding
-}
-
-
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass_NestedClass.go 1`] = `
-package customsubmodulename
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
-)
-
-// This class is here to show we can use nested classes across module boundaries.
-// Deprecated.
-type NestingClass_NestedClass interface {
- // Deprecated.
- Property() *string
-}
-
-// The jsii proxy struct for NestingClass_NestedClass
-type jsiiProxy_NestingClass_NestedClass struct {
- _ byte // padding
-}
-
-func (j *jsiiProxy_NestingClass_NestedClass) Property() *string {
- var returns *string
+func (j *jsiiProxy_Number) Value() *float64 {
+ var returns *float64
_jsii_.Get(
j,
- "property",
+ "value",
&returns,
)
return returns
}
+// Creates a Number object.
// Deprecated.
-func NewNestingClass_NestedClass() NestingClass_NestedClass {
+func NewNumber(value *float64) Number {
_init_.Initialize()
- j := jsiiProxy_NestingClass_NestedClass{}
+ j := jsiiProxy_Number{}
_jsii_.Create(
- "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
- nil, // no parameters
+ "@scope/jsii-calc-lib.Number",
+ []interface{}{value},
&j,
)
return &j
}
+// Creates a Number object.
// Deprecated.
-func NewNestingClass_NestedClass_Override(n NestingClass_NestedClass) {
+func NewNumber_Override(n Number, value *float64) {
_init_.Initialize()
_jsii_.Create(
- "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
- nil, // no parameters
+ "@scope/jsii-calc-lib.Number",
+ []interface{}{value},
n,
)
}
+func (n *jsiiProxy_Number) ToString() *string {
+ var returns *string
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_NestingClass_NestedStruct.go 1`] = `
-package customsubmodulename
+ _jsii_.Invoke(
+ n,
+ "toString",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+func (n *jsiiProxy_Number) TypeName() interface{} {
+ var returns interface{}
+
+ _jsii_.Invoke(
+ n,
+ "typeName",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/NumericValue.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+
+ "github.com/aws/jsii/jsii-calc/go/jcb"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal"
+)
+
+// Abstract class which represents a numeric value.
+// Deprecated.
+type NumericValue interface {
+ jcb.Base
+ // The value.
+ // Deprecated.
+ Value() *float64
+ // String representation of the value.
+ // Deprecated.
+ ToString() *string
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ // Deprecated.
+ TypeName() interface{}
+}
+
+// The jsii proxy struct for NumericValue
+type jsiiProxy_NumericValue struct {
+ internal.Type__jcbBase
+}
+
+func (j *jsiiProxy_NumericValue) Value() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "value",
+ &returns,
+ )
+ return returns
+}
+
+
+// Deprecated.
+func NewNumericValue_Override(n NumericValue) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.NumericValue",
+ nil, // no parameters
+ n,
+ )
+}
+
+func (n *jsiiProxy_NumericValue) ToString() *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ n,
+ "toString",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+func (n *jsiiProxy_NumericValue) TypeName() interface{} {
+ var returns interface{}
+
+ _jsii_.Invoke(
+ n,
+ "typeName",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Operation.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+)
+
+// Represents an operation on values.
+// Deprecated.
+type Operation interface {
+ NumericValue
+ // The value.
+ // Deprecated.
+ Value() *float64
+ // String representation of the value.
+ // Deprecated.
+ ToString() *string
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ // Deprecated.
+ TypeName() interface{}
+}
+
+// The jsii proxy struct for Operation
+type jsiiProxy_Operation struct {
+ jsiiProxy_NumericValue
+}
+
+func (j *jsiiProxy_Operation) Value() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "value",
+ &returns,
+ )
+ return returns
+}
+
+
+// Deprecated.
+func NewOperation_Override(o Operation) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.Operation",
+ nil, // no parameters
+ o,
+ )
+}
+
+func (o *jsiiProxy_Operation) ToString() *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ o,
+ "toString",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+func (o *jsiiProxy_Operation) TypeName() interface{} {
+ var returns interface{}
+
+ _jsii_.Invoke(
+ o,
+ "typeName",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/StructWithOnlyOptionals.go 1`] = `
+// A simple calcuator library built on JSII.
+package scopejsiicalclib
+
+
+// This is a struct with only optional properties.
+// Deprecated.
+type StructWithOnlyOptionals struct {
+ // The first optional!
+ // Deprecated.
+ Optional1 *string \`field:"optional" json:"optional1" yaml:"optional1"\`
+ // Deprecated.
+ Optional2 *float64 \`field:"optional" json:"optional2" yaml:"optional2"\`
+ // Deprecated.
+ Optional3 *bool \`field:"optional" json:"optional3" yaml:"optional3"\`
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/IReflectable.go 1`] = `
+package customsubmodulename
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+// Deprecated.
+type IReflectable interface {
+ // Deprecated.
+ Entries() *[]*ReflectableEntry
+}
+
+// The jsii proxy for IReflectable
+type jsiiProxy_IReflectable struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_IReflectable) Entries() *[]*ReflectableEntry {
+ var returns *[]*ReflectableEntry
+ _jsii_.Get(
+ j,
+ "entries",
+ &returns,
+ )
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass.go 1`] = `
+package customsubmodulename
+
+
+// This class is here to show we can use nested classes across module boundaries.
+// Deprecated.
+type NestingClass interface {
+}
+
+// The jsii proxy struct for NestingClass
+type jsiiProxy_NestingClass struct {
+ _ byte // padding
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass_NestedClass.go 1`] = `
+package customsubmodulename
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+)
+
+// This class is here to show we can use nested classes across module boundaries.
+// Deprecated.
+type NestingClass_NestedClass interface {
+ // Deprecated.
+ Property() *string
+}
+
+// The jsii proxy struct for NestingClass_NestedClass
+type jsiiProxy_NestingClass_NestedClass struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_NestingClass_NestedClass) Property() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "property",
+ &returns,
+ )
+ return returns
+}
+
+
+// Deprecated.
+func NewNestingClass_NestedClass() NestingClass_NestedClass {
+ _init_.Initialize()
+
+ j := jsiiProxy_NestingClass_NestedClass{}
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
+ nil, // no parameters
+ &j,
+ )
+
+ return &j
+}
+
+// Deprecated.
+func NewNestingClass_NestedClass_Override(n NestingClass_NestedClass) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
+ nil, // no parameters
+ n,
+ )
+}
+
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/NestingClass_NestedStruct.go 1`] = `
+package customsubmodulename
// This is a struct, nested within a class.
@@ -1401,7 +1881,14 @@ type NestingClass_NestedStruct struct {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_ReflectableEntry.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/README.md 1`] = `
+# Submodule Readme
+
+This is a submodule readme.
+
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/ReflectableEntry.go 1`] = `
package customsubmodulename
@@ -1416,7 +1903,7 @@ type ReflectableEntry struct {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector.go 1`] = `
package customsubmodulename
import (
@@ -1477,8 +1964,8 @@ func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interf
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval.go 1`] = `
-package deprecationremoval
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/main.go 1`] = `
+package customsubmodulename
import (
"reflect"
@@ -1488,28 +1975,56 @@ import (
func init() {
_jsii_.RegisterInterface(
- "@scope/jsii-calc-lib.deprecationRemoval.IInterface",
- reflect.TypeOf((*IInterface)(nil)).Elem(),
+ "@scope/jsii-calc-lib.submodule.IReflectable",
+ reflect.TypeOf((*IReflectable)(nil)).Elem(),
[]_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
+ _jsii_.MemberProperty{JsiiProperty: "entries", GoGetter: "Entries"},
},
func() interface{} {
- return &jsiiProxy_IInterface{}
+ return &jsiiProxy_IReflectable{}
},
)
_jsii_.RegisterClass(
- "@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory",
- reflect.TypeOf((*InterfaceFactory)(nil)).Elem(),
+ "@scope/jsii-calc-lib.submodule.NestingClass",
+ reflect.TypeOf((*NestingClass)(nil)).Elem(),
nil, // no members
func() interface{} {
- return &jsiiProxy_InterfaceFactory{}
+ return &jsiiProxy_NestingClass{}
+ },
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass",
+ reflect.TypeOf((*NestingClass_NestedClass)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
+ },
+ func() interface{} {
+ return &jsiiProxy_NestingClass_NestedClass{}
+ },
+ )
+ _jsii_.RegisterStruct(
+ "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct",
+ reflect.TypeOf((*NestingClass_NestedStruct)(nil)).Elem(),
+ )
+ _jsii_.RegisterStruct(
+ "@scope/jsii-calc-lib.submodule.ReflectableEntry",
+ reflect.TypeOf((*ReflectableEntry)(nil)).Elem(),
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-lib.submodule.Reflector",
+ reflect.TypeOf((*Reflector)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "asMap", GoMethod: "AsMap"},
+ },
+ func() interface{} {
+ return &jsiiProxy_Reflector{}
},
)
}
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval_IInterface.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/IInterface.go 1`] = `
package deprecationremoval
import (
@@ -1538,7 +2053,7 @@ func (i *jsiiProxy_IInterface) Method() {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/deprecationremoval_InterfaceFactory.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/InterfaceFactory.go 1`] = `
package deprecationremoval
import (
@@ -1572,6 +2087,38 @@ func InterfaceFactory_Create() IInterface {
}
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/deprecationremoval/main.go 1`] = `
+package deprecationremoval
+
+import (
+ "reflect"
+
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+)
+
+func init() {
+ _jsii_.RegisterInterface(
+ "@scope/jsii-calc-lib.deprecationRemoval.IInterface",
+ reflect.TypeOf((*IInterface)(nil)).Elem(),
+ []_jsii_.Member{
+ _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
+ },
+ func() interface{} {
+ return &jsiiProxy_IInterface{}
+ },
+ )
+ _jsii_.RegisterClass(
+ "@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory",
+ reflect.TypeOf((*InterfaceFactory)(nil)).Elem(),
+ nil, // no members
+ func() interface{} {
+ return &jsiiProxy_InterfaceFactory{}
+ },
+ )
+}
+
`;
exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/go.mod 1`] = `
@@ -1631,7 +2178,7 @@ func Initialize() {
exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/jsii/scope-jsii-calc-lib-0.0.0.tgz 1`] = `go/scopejsiicalclib/jsii/scope-jsii-calc-lib-0.0.0.tgz is a tarball`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib.go 1`] = `
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/main.go 1`] = `
package scopejsiicalclib
import (
@@ -1757,189 +2304,707 @@ func init() {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
-
- "github.com/aws/jsii/jsii-calc/go/jcb"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
-)
-
-// A base class for testing #2647.
-//
-// The method \`foo\` has a parameter that uses a type
-// from a dependent module. Since Go "reimplments" this method, it will also need
-// to include an "import" statement for the calc-base module.
-// See: https://github.com/aws/jsii/issues/2647
-//
-// Deprecated.
-type BaseFor2647 interface {
- // Deprecated.
- Foo(obj jcb.IBaseInterface)
-}
-
-// The jsii proxy struct for BaseFor2647
-type jsiiProxy_BaseFor2647 struct {
- _ byte // padding
-}
-
-// Deprecated.
-func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 {
- _init_.Initialize()
-
- j := jsiiProxy_BaseFor2647{}
-
- _jsii_.Create(
- "@scope/jsii-calc-lib.BaseFor2647",
- []interface{}{very},
- &j,
- )
-
- return &j
-}
-
-// Deprecated.
-func NewBaseFor2647_Override(b BaseFor2647, very scopejsiicalcbaseofbase.Very) {
- _init_.Initialize()
-
- _jsii_.Create(
- "@scope/jsii-calc-lib.BaseFor2647",
- []interface{}{very},
- b,
- )
-}
-
-func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) {
- _jsii_.InvokeVoid(
- b,
- "foo",
- []interface{}{obj},
- )
-}
-
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/version 1`] = `
+0.0.0-devpreview
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_DiamondLeft.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
-
-
-// Deprecated.
-type DiamondLeft struct {
- // Deprecated.
- HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\`
- // Deprecated.
- Left *float64 \`field:"optional" json:"left" yaml:"left"\`
-}
-
-
+exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = `
+
+ ┗━ 📁 go
+ ┗━ 📁 scopejsiicalclib
+ ┣━ 🆕 BaseFor2647__checks.go
+ ┣━ 🆕 BaseFor2647__no_checks.go
+ ┣━ 📄 BaseFor2647.go.diff
+ ┣━ 📁 customsubmodulename
+ ┃ ┣━ 🆕 Reflector__checks.go
+ ┃ ┣━ 🆕 Reflector__no_checks.go
+ ┃ ┗━ 📄 Reflector.go.diff
+ ┣━ 🆕 Number__checks.go
+ ┣━ 🆕 Number__no_checks.go
+ ┗━ 📄 Number.go.diff
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_DiamondRight.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
-
-
-// Deprecated.
-type DiamondRight struct {
- // Deprecated.
- HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\`
- // Deprecated.
- Right *bool \`field:"optional" json:"right" yaml:"right"\`
-}
-
-
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647.go.diff 1`] = `
+--- go/scopejsiicalclib/BaseFor2647.go --no-runtime-type-checking
++++ go/scopejsiicalclib/BaseFor2647.go --runtime-type-checking
+@@ -29,10 +29,13 @@
+
+ // Deprecated.
+ func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 {
+ _init_.Initialize()
+
++ if err := validateNewBaseFor2647Parameters(very); err != nil {
++ panic(err)
++ }
+ j := jsiiProxy_BaseFor2647{}
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.BaseFor2647",
+ []interface{}{very},
+@@ -52,10 +55,13 @@
+ b,
+ )
+ }
+
+ func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) {
++ if err := b.validateFooParameters(obj); err != nil {
++ panic(err)
++ }
+ _jsii_.InvokeVoid(
+ b,
+ "foo",
+ []interface{}{obj},
+ )
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_EnumFromScopedModule.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647__checks.go.diff 1`] = `
+--- go/scopejsiicalclib/BaseFor2647__checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/BaseFor2647__checks.go --runtime-type-checking
+@@ -0,0 +1,28 @@
++//go:build !no_runtime_type_checking
++
++// A simple calcuator library built on JSII.
++package scopejsiicalclib
++
++import (
++ "fmt"
++
++ "github.com/aws/jsii/jsii-calc/go/jcb"
++ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
++)
++
++func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error {
++ if obj == nil {
++ return fmt.Errorf("parameter obj is required, but nil was provided")
++ }
++
++ return nil
++}
++
++func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error {
++ if very == nil {
++ return fmt.Errorf("parameter very is required, but nil was provided")
++ }
++
++ return nil
++}
++
+`;
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/BaseFor2647__no_checks.go.diff 1`] = `
+--- go/scopejsiicalclib/BaseFor2647__no_checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/BaseFor2647__no_checks.go --runtime-type-checking
+@@ -0,0 +1,15 @@
++//go:build no_runtime_type_checking
++
++// A simple calcuator library built on JSII.
++package scopejsiicalclib
++
++// Building without runtime type checking enabled, so all the below just return nil
++
++func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error {
++ return nil
++}
++
++func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error {
++ return nil
++}
++
+`;
-// Check that enums from \\@scoped packages can be references.
-//
-// See awslabs/jsii#138.
-// Deprecated.
-type EnumFromScopedModule string
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number.go.diff 1`] = `
+--- go/scopejsiicalclib/Number.go --no-runtime-type-checking
++++ go/scopejsiicalclib/Number.go --runtime-type-checking
+@@ -55,10 +55,13 @@
+ // Creates a Number object.
+ // Deprecated.
+ func NewNumber(value *float64) Number {
+ _init_.Initialize()
+
++ if err := validateNewNumberParameters(value); err != nil {
++ panic(err)
++ }
+ j := jsiiProxy_Number{}
+
+ _jsii_.Create(
+ "@scope/jsii-calc-lib.Number",
+ []interface{}{value},
+`;
-const (
- // Deprecated.
- EnumFromScopedModule_VALUE1 EnumFromScopedModule = "VALUE1"
- // Deprecated.
- EnumFromScopedModule_VALUE2 EnumFromScopedModule = "VALUE2"
-)
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number__checks.go.diff 1`] = `
+--- go/scopejsiicalclib/Number__checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/Number__checks.go --runtime-type-checking
+@@ -0,0 +1,17 @@
++//go:build !no_runtime_type_checking
++
++// A simple calcuator library built on JSII.
++package scopejsiicalclib
++
++import (
++ "fmt"
++)
++
++func validateNewNumberParameters(value *float64) error {
++ if value == nil {
++ return fmt.Errorf("parameter value is required, but nil was provided")
++ }
++
++ return nil
++}
++
+`;
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/Number__no_checks.go.diff 1`] = `
+--- go/scopejsiicalclib/Number__no_checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/Number__no_checks.go --runtime-type-checking
+@@ -0,0 +1,11 @@
++//go:build no_runtime_type_checking
++
++// A simple calcuator library built on JSII.
++package scopejsiicalclib
++
++// Building without runtime type checking enabled, so all the below just return nil
++
++func validateNewNumberParameters(value *float64) error {
++ return nil
++}
++
+`;
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector.go.diff 1`] = `
+--- go/scopejsiicalclib/customsubmodulename/Reflector.go --no-runtime-type-checking
++++ go/scopejsiicalclib/customsubmodulename/Reflector.go --runtime-type-checking
+@@ -41,10 +41,13 @@
+ r,
+ )
+ }
+
+ func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interface{} {
++ if err := r.validateAsMapParameters(reflectable); err != nil {
++ panic(err)
++ }
+ var returns *map[string]interface{}
+
+ _jsii_.Invoke(
+ r,
+ "asMap",
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IDoublable.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector__checks.go.diff 1`] = `
+--- go/scopejsiicalclib/customsubmodulename/Reflector__checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/customsubmodulename/Reflector__checks.go --runtime-type-checking
+@@ -0,0 +1,16 @@
++//go:build !no_runtime_type_checking
++
++package customsubmodulename
++
++import (
++ "fmt"
++)
++
++func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error {
++ if reflectable == nil {
++ return fmt.Errorf("parameter reflectable is required, but nil was provided")
++ }
++
++ return nil
++}
++
+`;
+
+exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go.diff 1`] = `
+--- go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go --no-runtime-type-checking
++++ go/scopejsiicalclib/customsubmodulename/Reflector__no_checks.go --runtime-type-checking
+@@ -0,0 +1,10 @@
++//go:build no_runtime_type_checking
++
++package customsubmodulename
++
++// Building without runtime type checking enabled, so all the below just return nil
++
++func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error {
++ return nil
++}
++
+`;
+
+exports[`Generated code for "jsii-calc": / 1`] = `
+
+ ┗━ 📁 go
+ ┗━ 📁 jsiicalc
+ ┣━ 📄 AbstractClass.go
+ ┣━ 📄 AbstractClassBase.go
+ ┣━ 📄 AbstractClassReturner.go
+ ┣━ 📄 AbstractSuite.go
+ ┣━ 📄 Add.go
+ ┣━ 📄 AllowedMethodNames.go
+ ┣━ 📄 AllTypes.go
+ ┣━ 📄 AllTypesEnum.go
+ ┣━ 📄 AmbiguousParameters.go
+ ┣━ 📁 anonymous
+ ┃ ┣━ 📄 IOptionA.go
+ ┃ ┣━ 📄 IOptionB.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 UseOptions.go
+ ┣━ 📄 AnonymousImplementationProvider.go
+ ┣━ 📄 AsyncVirtualMethods.go
+ ┣━ 📄 AugmentableClass.go
+ ┣━ 📄 BaseClass.go
+ ┣━ 📄 BaseJsii976.go
+ ┣━ 📄 Bell.go
+ ┣━ 📄 BinaryOperation.go
+ ┣━ 📄 BurriedAnonymousObject.go
+ ┣━ 📄 Calculator.go
+ ┣━ 📄 CalculatorProps.go
+ ┣━ 📁 cdk16625
+ ┃ ┣━ 📄 Cdk16625.go
+ ┃ ┣━ 📁 donotimport
+ ┃ ┃ ┣━ 📁 internal
+ ┃ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 UnimportedSubmoduleType.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📁 cdk22369
+ ┃ ┣━ 📄 AcceptsPath.go
+ ┃ ┣━ 📄 AcceptsPathProps.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📄 ChildStruct982.go
+ ┣━ 📄 ClassThatImplementsTheInternalInterface.go
+ ┣━ 📄 ClassThatImplementsThePrivateInterface.go
+ ┣━ 📄 ClassWithCollectionOfUnions.go
+ ┣━ 📄 ClassWithCollections.go
+ ┣━ 📄 ClassWithContainerTypes.go
+ ┣━ 📄 ClassWithDocs.go
+ ┣━ 📄 ClassWithJavaReservedWords.go
+ ┣━ 📄 ClassWithMutableObjectLiteralProperty.go
+ ┣━ 📄 ClassWithNestedUnion.go
+ ┣━ 📄 ClassWithPrivateConstructorAndAutomaticProperties.go
+ ┣━ 📁 composition
+ ┃ ┣━ 📄 CompositeOperation_CompositionStringStyle.go
+ ┃ ┣━ 📄 CompositeOperation.go
+ ┃ ┣━ 📁 internal
+ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📄 ConfusingToJackson.go
+ ┣━ 📄 ConfusingToJacksonStruct.go
+ ┣━ 📄 ConstructorPassesThisOut.go
+ ┣━ 📄 Constructors.go
+ ┣━ 📄 ConsumePureInterface.go
+ ┣━ 📄 ConsumerCanRingBell.go
+ ┣━ 📄 ConsumersOfThisCrazyTypeSystem.go
+ ┣━ 📄 ContainerProps.go
+ ┣━ 📄 DataRenderer.go
+ ┣━ 📄 Default.go
+ ┣━ 📄 DefaultedConstructorArgument.go
+ ┣━ 📄 Demonstrate982.go
+ ┣━ 📄 DeprecatedClass.go
+ ┣━ 📄 DeprecatedEnum.go
+ ┣━ 📄 DeprecatedStruct.go
+ ┣━ 📁 derivedclasshasnoproperties
+ ┃ ┣━ 📄 Base.go
+ ┃ ┣━ 📄 Derived.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📄 DerivedStruct.go
+ ┣━ 📄 DiamondBottom.go
+ ┣━ 📄 DiamondInheritanceBaseLevelStruct.go
+ ┣━ 📄 DiamondInheritanceFirstMidLevelStruct.go
+ ┣━ 📄 DiamondInheritanceSecondMidLevelStruct.go
+ ┣━ 📄 DiamondInheritanceTopLevelStruct.go
+ ┣━ 📄 DisappointingCollectionSource.go
+ ┣━ 📄 DocumentedClass.go
+ ┣━ 📄 DoNotOverridePrivates.go
+ ┣━ 📄 DoNotRecognizeAnyAsOptional.go
+ ┣━ 📄 DontComplainAboutVariadicAfterOptional.go
+ ┣━ 📄 DoubleTrouble.go
+ ┣━ 📄 DummyObj.go
+ ┣━ 📄 DynamicPropertyBearer.go
+ ┣━ 📄 DynamicPropertyBearerChild.go
+ ┣━ 📄 Entropy.go
+ ┣━ 📄 EnumDispenser.go
+ ┣━ 📄 EraseUndefinedHashValues.go
+ ┣━ 📄 EraseUndefinedHashValuesOptions.go
+ ┣━ 📄 ExperimentalClass.go
+ ┣━ 📄 ExperimentalEnum.go
+ ┣━ 📄 ExperimentalStruct.go
+ ┣━ 📄 ExportedBaseClass.go
+ ┣━ 📄 ExtendsInternalInterface.go
+ ┣━ 📄 ExternalClass.go
+ ┣━ 📄 ExternalEnum.go
+ ┣━ 📄 ExternalStruct.go
+ ┣━ 📄 FullCombo.go
+ ┣━ 📄 GiveMeStructs.go
+ ┣━ 📄 go.mod
+ ┣━ 📄 Greetee.go
+ ┣━ 📄 GreetingAugmenter.go
+ ┣━ 📁 homonymousforwardreferences
+ ┃ ┣━ 📁 bar
+ ┃ ┃ ┣━ 📄 Consumer.go
+ ┃ ┃ ┣━ 📄 ConsumerProps.go
+ ┃ ┃ ┣━ 📄 Homonymous.go
+ ┃ ┃ ┗━ 📄 main.go
+ ┃ ┣━ 📁 foo
+ ┃ ┃ ┣━ 📄 Consumer.go
+ ┃ ┃ ┣━ 📄 ConsumerProps.go
+ ┃ ┃ ┣━ 📄 Homonymous.go
+ ┃ ┃ ┗━ 📄 main.go
+ ┃ ┗━ 📄 README.md
+ ┣━ 📄 IAnonymousImplementationProvider.go
+ ┣━ 📄 IAnonymouslyImplementMe.go
+ ┣━ 📄 IAnotherPublicInterface.go
+ ┣━ 📄 IBell.go
+ ┣━ 📄 IBellRinger.go
+ ┣━ 📄 IConcreteBellRinger.go
+ ┣━ 📄 IDeprecatedInterface.go
+ ┣━ 📄 IExperimentalInterface.go
+ ┣━ 📄 IExtendsPrivateInterface.go
+ ┣━ 📄 IExternalInterface.go
+ ┣━ 📄 IFriendlier.go
+ ┣━ 📄 IFriendlyRandomGenerator.go
+ ┣━ 📄 IIndirectlyImplemented.go
+ ┣━ 📄 IInterfaceImplementedByAbstractClass.go
+ ┣━ 📄 IInterfaceThatShouldNotBeADataType.go
+ ┣━ 📄 IInterfaceWithInternal.go
+ ┣━ 📄 IInterfaceWithMethods.go
+ ┣━ 📄 IInterfaceWithOptionalMethodArguments.go
+ ┣━ 📄 IInterfaceWithProperties.go
+ ┣━ 📄 IInterfaceWithPropertiesExtension.go
+ ┣━ 📄 IJavaReservedWordsInAnInterface.go
+ ┣━ 📄 IJSII417Derived.go
+ ┣━ 📄 IJSII417PublicBaseOfBase.go
+ ┣━ 📄 IJsii487External.go
+ ┣━ 📄 IJsii487External2.go
+ ┣━ 📄 IJsii496.go
+ ┣━ 📄 Implementation.go
+ ┣━ 📄 ImplementInternalInterface.go
+ ┣━ 📄 ImplementsInterfaceWithInternal.go
+ ┣━ 📄 ImplementsInterfaceWithInternalSubclass.go
+ ┣━ 📄 ImplementsPrivateInterface.go
+ ┣━ 📄 ImplictBaseOfBase.go
+ ┣━ 📄 IMutableObjectLiteral.go
+ ┣━ 📄 InbetweenClass.go
+ ┣━ 📄 INonInternalInterface.go
+ ┣━ 📄 InterfaceCollections.go
+ ┣━ 📁 interfaceinnamespaceincludesclasses
+ ┃ ┣━ 📄 Foo.go
+ ┃ ┣━ 📄 Hello.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📁 interfaceinnamespaceonlyinterface
+ ┃ ┣━ 📄 Hello.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📄 InterfacesMaker.go
+ ┣━ 📁 internal
+ ┃ ┗━ 📄 types.go
+ ┣━ 📄 IObjectWithProperty.go
+ ┣━ 📄 IOptionalMethod.go
+ ┣━ 📄 IPrivatelyImplemented.go
+ ┣━ 📄 IPublicInterface.go
+ ┣━ 📄 IPublicInterface2.go
+ ┣━ 📄 IRandomNumberGenerator.go
+ ┣━ 📄 IReturnJsii976.go
+ ┣━ 📄 IReturnsNumber.go
+ ┣━ 📄 Isomorphism.go
+ ┣━ 📄 Issue2638.go
+ ┣━ 📄 Issue2638B.go
+ ┣━ 📄 IStableInterface.go
+ ┣━ 📄 IStructReturningDelegate.go
+ ┣━ 📄 IWallClock.go
+ ┣━ 📄 JavaReservedWords.go
+ ┣━ 📁 jsii
+ ┃ ┣━ 📄 jsii-calc-3.20.120.tgz
+ ┃ ┗━ 📄 jsii.go
+ ┣━ 📁 jsii3656
+ ┃ ┣━ 📄 ImplementMeOpts.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 OverrideMe.go
+ ┣━ 📄 JSII417Derived.go
+ ┣━ 📄 JSII417PublicBaseOfBase.go
+ ┣━ 📄 Jsii487Derived.go
+ ┣━ 📄 Jsii496Derived.go
+ ┣━ 📄 JsiiAgent.go
+ ┣━ 📄 JSObjectLiteralForInterface.go
+ ┣━ 📄 JSObjectLiteralToNative.go
+ ┣━ 📄 JSObjectLiteralToNativeClass.go
+ ┣━ 📄 JsonFormatter.go
+ ┣━ 📄 LevelOne_PropBooleanValue.go
+ ┣━ 📄 LevelOne_PropProperty.go
+ ┣━ 📄 LevelOne.go
+ ┣━ 📄 LevelOneProps.go
+ ┣━ 📄 LICENSE
+ ┣━ 📄 LoadBalancedFargateServiceProps.go
+ ┣━ 📄 main.go
+ ┣━ 📄 MethodNamedProperty.go
+ ┣━ 📁 module2530
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 MyClass.go
+ ┣━ 📁 module2617
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 OnlyStatics.go
+ ┣━ 📁 module2647
+ ┃ ┣━ 📄 ExtendAndImplement.go
+ ┃ ┣━ 📁 internal
+ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📁 module2689
+ ┃ ┣━ 📁 methods
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 MyClass.go
+ ┃ ┣━ 📁 props
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 MyClass.go
+ ┃ ┣━ 📁 retval
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 MyClass.go
+ ┃ ┗━ 📁 structs
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 MyStruct.go
+ ┣━ 📁 module2692
+ ┃ ┣━ 📁 submodule1
+ ┃ ┃ ┣━ 📄 Bar.go
+ ┃ ┃ ┗━ 📄 main.go
+ ┃ ┗━ 📁 submodule2
+ ┃ ┣━ 📄 Bar.go
+ ┃ ┣━ 📄 Foo.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📁 module2700
+ ┃ ┣━ 📄 Base.go
+ ┃ ┣━ 📄 Derived.go
+ ┃ ┣━ 📄 IFoo.go
+ ┃ ┗━ 📄 main.go
+ ┣━ 📁 module2702
+ ┃ ┣━ 📄 Baz.go
+ ┃ ┣━ 📄 Class1.go
+ ┃ ┣━ 📄 Class2.go
+ ┃ ┣━ 📄 Class3.go
+ ┃ ┣━ 📄 Construct.go
+ ┃ ┣━ 📄 IBaz.go
+ ┃ ┣━ 📄 IConstruct.go
+ ┃ ┣━ 📄 IFoo.go
+ ┃ ┣━ 📁 internal
+ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┣━ 📄 IResource.go
+ ┃ ┣━ 📄 IVpc.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┣━ 📄 Resource.go
+ ┃ ┗━ 📄 Vpc.go
+ ┣━ 📄 Multiply.go
+ ┣━ 📄 Negate.go
+ ┣━ 📄 NestedClassInstance.go
+ ┣━ 📄 NestedStruct.go
+ ┣━ 📄 NodeStandardLibrary.go
+ ┣━ 📁 nodirect
+ ┃ ┣━ 📁 sub1
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 TypeFromSub1.go
+ ┃ ┗━ 📁 sub2
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 TypeFromSub2.go
+ ┣━ 📄 NOTICE
+ ┣━ 📄 NullShouldBeTreatedAsUndefined.go
+ ┣━ 📄 NullShouldBeTreatedAsUndefinedData.go
+ ┣━ 📄 NumberGenerator.go
+ ┣━ 📄 ObjectRefsInCollections.go
+ ┣━ 📄 ObjectWithPropertyProvider.go
+ ┣━ 📄 Old.go
+ ┣━ 📁 onlystatic
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 OnlyStaticMethods.go
+ ┣━ 📄 OptionalArgumentInvoker.go
+ ┣━ 📄 OptionalConstructorArgument.go
+ ┣━ 📄 OptionalStruct.go
+ ┣━ 📄 OptionalStructConsumer.go
+ ┣━ 📄 OverridableProtectedMember.go
+ ┣━ 📄 OverrideReturnsObject.go
+ ┣━ 📄 ParamShadowsBuiltins.go
+ ┣━ 📄 ParamShadowsBuiltinsProps.go
+ ┣━ 📄 ParamShadowsScope.go
+ ┣━ 📄 ParentStruct982.go
+ ┣━ 📄 PartiallyInitializedThisConsumer.go
+ ┣━ 📄 Polymorphism.go
+ ┣━ 📄 Power.go
+ ┣━ 📄 PromiseNothing.go
+ ┣━ 📄 PropertyNamedProperty.go
+ ┣━ 📄 PublicClass.go
+ ┣━ 📄 PythonReservedWords.go
+ ┣━ 📁 pythonself
+ ┃ ┣━ 📄 ClassWithSelf.go
+ ┃ ┣━ 📄 ClassWithSelfKwarg.go
+ ┃ ┣━ 📄 IInterfaceWithSelf.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 StructWithSelf.go
+ ┣━ 📄 README.md
+ ┣━ 📄 ReferenceEnumFromScopedPackage.go
+ ┣━ 📄 ReturnsPrivateImplementationOfInterface.go
+ ┣━ 📄 RootStruct.go
+ ┣━ 📄 RootStructValidator.go
+ ┣━ 📄 RuntimeTypeChecking.go
+ ┣━ 📄 SecondLevelStruct.go
+ ┣━ 📄 SingleInstanceTwoTypes.go
+ ┣━ 📄 SingletonInt.go
+ ┣━ 📄 SingletonIntEnum.go
+ ┣━ 📄 SingletonString.go
+ ┣━ 📄 SingletonStringEnum.go
+ ┣━ 📄 SmellyStruct.go
+ ┣━ 📄 SomeTypeJsii976.go
+ ┣━ 📄 StableClass.go
+ ┣━ 📄 StableEnum.go
+ ┣━ 📄 StableStruct.go
+ ┣━ 📄 StaticContext.go
+ ┣━ 📄 StaticHelloChild.go
+ ┣━ 📄 StaticHelloParent.go
+ ┣━ 📄 Statics.go
+ ┣━ 📄 StringEnum.go
+ ┣━ 📄 StripInternal.go
+ ┣━ 📄 StructA.go
+ ┣━ 📄 StructB.go
+ ┣━ 📄 StructParameterType.go
+ ┣━ 📄 StructPassing.go
+ ┣━ 📄 StructUnionConsumer.go
+ ┣━ 📄 StructWithCollectionOfUnionts.go
+ ┣━ 📄 StructWithEnum.go
+ ┣━ 📄 StructWithJavaReservedWords.go
+ ┣━ 📁 submodule
+ ┃ ┣━ 📁 backreferences
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 MyClassReference.go
+ ┃ ┣━ 📁 child
+ ┃ ┃ ┣━ 📄 Awesomeness.go
+ ┃ ┃ ┣━ 📄 Goodness.go
+ ┃ ┃ ┣━ 📄 InnerClass.go
+ ┃ ┃ ┣━ 📄 KwargsProps.go
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┣━ 📄 OuterClass.go
+ ┃ ┃ ┣━ 📄 SomeEnum.go
+ ┃ ┃ ┣━ 📄 SomeStruct.go
+ ┃ ┃ ┗━ 📄 Structure.go
+ ┃ ┣━ 📄 Default.go
+ ┃ ┣━ 📁 internal
+ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┣━ 📁 isolated
+ ┃ ┃ ┣━ 📄 Kwargs.go
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 README.md
+ ┃ ┣━ 📄 main.go
+ ┃ ┣━ 📄 MyClass.go
+ ┃ ┣━ 📁 nestedsubmodule
+ ┃ ┃ ┣━ 📁 deeplynested
+ ┃ ┃ ┃ ┣━ 📄 INamespaced.go
+ ┃ ┃ ┃ ┗━ 📄 main.go
+ ┃ ┃ ┣━ 📁 internal
+ ┃ ┃ ┃ ┗━ 📄 types.go
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 Namespaced.go
+ ┃ ┣━ 📁 param
+ ┃ ┃ ┣━ 📄 main.go
+ ┃ ┃ ┗━ 📄 SpecialParameter.go
+ ┃ ┣━ 📄 README.md
+ ┃ ┗━ 📁 returnsparam
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 ReturnsSpecialParameter.go
+ ┣━ 📄 Sum.go
+ ┣━ 📄 SupportsNiceJavaBuilder.go
+ ┣━ 📄 SupportsNiceJavaBuilderProps.go
+ ┣━ 📄 SupportsNiceJavaBuilderWithRequiredProps.go
+ ┣━ 📄 SyncVirtualMethods.go
+ ┣━ 📄 TestStructWithEnum.go
+ ┣━ 📄 Thrower.go
+ ┣━ 📄 TopLevelStruct.go
+ ┣━ 📄 TwoMethodsWithSimilarCapitalization.go
+ ┣━ 📄 UmaskCheck.go
+ ┣━ 📄 UnaryOperation.go
+ ┣━ 📁 union
+ ┃ ┣━ 📄 ConsumesUnion.go
+ ┃ ┣━ 📄 IResolvable.go
+ ┃ ┣━ 📄 main.go
+ ┃ ┗━ 📄 Resolvable.go
+ ┣━ 📄 UnionProperties.go
+ ┣━ 📄 UpcasingReflectable.go
+ ┣━ 📄 UseBundledDependency.go
+ ┣━ 📄 UseCalcBase.go
+ ┣━ 📄 UsesInterfaceWithProperties.go
+ ┣━ 📄 VariadicInvoker.go
+ ┣━ 📄 VariadicMethod.go
+ ┣━ 📄 VariadicTypeUnion.go
+ ┣━ 📄 version
+ ┣━ 📄 VirtualMethodPlayground.go
+ ┣━ 📄 VoidCallback.go
+ ┗━ 📄 WithPrivatePropertyInConstructor.go
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClass.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-// The general contract for a concrete number.
-// Deprecated.
-type IDoublable interface {
- // Deprecated.
- DoubleValue() *float64
+type AbstractClass interface {
+ AbstractClassBase
+ IInterfaceImplementedByAbstractClass
+ AbstractProperty() *string
+ PropFromInterface() *string
+ AbstractMethod(name *string) *string
+ NonAbstractMethod() *float64
}
-// The jsii proxy for IDoublable
-type jsiiProxy_IDoublable struct {
- _ byte // padding
+// The jsii proxy struct for AbstractClass
+type jsiiProxy_AbstractClass struct {
+ jsiiProxy_AbstractClassBase
+ jsiiProxy_IInterfaceImplementedByAbstractClass
}
-func (j *jsiiProxy_IDoublable) DoubleValue() *float64 {
- var returns *float64
+func (j *jsiiProxy_AbstractClass) AbstractProperty() *string {
+ var returns *string
_jsii_.Get(
j,
- "doubleValue",
+ "abstractProperty",
&returns,
)
return returns
}
+func (j *jsiiProxy_AbstractClass) PropFromInterface() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "propFromInterface",
+ &returns,
+ )
+ return returns
+}
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IFriendly.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
+func NewAbstractClass_Override(a AbstractClass) {
+ _init_.Initialize()
-// Applies to classes that are considered friendly.
-//
-// These classes can be greeted with
-// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner.
-// Deprecated.
-type IFriendly interface {
- // Say hello!
- // Deprecated.
- Hello() *string
+ _jsii_.Create(
+ "jsii-calc.AbstractClass",
+ nil, // no parameters
+ a,
+ )
}
-// The jsii proxy for IFriendly
-type jsiiProxy_IFriendly struct {
- _ byte // padding
+func (a *jsiiProxy_AbstractClass) AbstractMethod(name *string) *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ a,
+ "abstractMethod",
+ []interface{}{name},
+ &returns,
+ )
+
+ return returns
}
-func (i *jsiiProxy_IFriendly) Hello() *string {
- var returns *string
+func (a *jsiiProxy_AbstractClass) NonAbstractMethod() *float64 {
+ var returns *float64
_jsii_.Invoke(
- i,
- "hello",
+ a,
+ "nonAbstractMethod",
nil, // no parameters
&returns,
)
@@ -1950,154 +3015,109 @@ func (i *jsiiProxy_IFriendly) Hello() *string {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_IThreeLevelsInterface.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClassBase.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
-
- "github.com/aws/jsii/jsii-calc/go/jcb"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-// Interface that inherits from packages 2 levels up the tree.
-//
-// Their presence validates that .NET/Java/jsii-reflect can track all fields
-// far enough up the tree.
-// Deprecated.
-type IThreeLevelsInterface interface {
- jcb.IBaseInterface
- // Deprecated.
- Baz()
+type AbstractClassBase interface {
+ AbstractProperty() *string
}
-// The jsii proxy for IThreeLevelsInterface
-type jsiiProxy_IThreeLevelsInterface struct {
- internal.Type__jcbIBaseInterface
+// The jsii proxy struct for AbstractClassBase
+type jsiiProxy_AbstractClassBase struct {
+ _ byte // padding
}
-func (i *jsiiProxy_IThreeLevelsInterface) Baz() {
- _jsii_.InvokeVoid(
- i,
- "baz",
- nil, // no parameters
+func (j *jsiiProxy_AbstractClassBase) AbstractProperty() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "abstractProperty",
+ &returns,
)
+ return returns
}
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_MyFirstStruct.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
-
+func NewAbstractClassBase_Override(a AbstractClassBase) {
+ _init_.Initialize()
-// This is the first struct we have created in jsii.
-// Deprecated.
-type MyFirstStruct struct {
- // An awesome number value.
- // Deprecated.
- Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\`
- // A string value.
- // Deprecated.
- Astring *string \`field:"required" json:"astring" yaml:"astring"\`
- // Deprecated.
- FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\`
+ _jsii_.Create(
+ "jsii-calc.AbstractClassBase",
+ nil, // no parameters
+ a,
+ )
}
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractClassReturner.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-// Represents a concrete number.
-// Deprecated.
-type Number interface {
- NumericValue
- IDoublable
- // The number multiplied by 2.
- // Deprecated.
- DoubleValue() *float64
- // The number.
- // Deprecated.
- Value() *float64
- // String representation of the value.
- // Deprecated.
- ToString() *string
- // Returns: the name of the class (to verify native type names are created for derived classes).
- // Deprecated.
- TypeName() interface{}
-}
-
-// The jsii proxy struct for Number
-type jsiiProxy_Number struct {
- jsiiProxy_NumericValue
- jsiiProxy_IDoublable
+type AbstractClassReturner interface {
+ ReturnAbstractFromProperty() AbstractClassBase
+ GiveMeAbstract() AbstractClass
+ GiveMeInterface() IInterfaceImplementedByAbstractClass
}
-func (j *jsiiProxy_Number) DoubleValue() *float64 {
- var returns *float64
- _jsii_.Get(
- j,
- "doubleValue",
- &returns,
- )
- return returns
+// The jsii proxy struct for AbstractClassReturner
+type jsiiProxy_AbstractClassReturner struct {
+ _ byte // padding
}
-func (j *jsiiProxy_Number) Value() *float64 {
- var returns *float64
+func (j *jsiiProxy_AbstractClassReturner) ReturnAbstractFromProperty() AbstractClassBase {
+ var returns AbstractClassBase
_jsii_.Get(
j,
- "value",
+ "returnAbstractFromProperty",
&returns,
)
return returns
}
-// Creates a Number object.
-// Deprecated.
-func NewNumber(value *float64) Number {
+func NewAbstractClassReturner() AbstractClassReturner {
_init_.Initialize()
- j := jsiiProxy_Number{}
+ j := jsiiProxy_AbstractClassReturner{}
_jsii_.Create(
- "@scope/jsii-calc-lib.Number",
- []interface{}{value},
+ "jsii-calc.AbstractClassReturner",
+ nil, // no parameters
&j,
)
return &j
}
-// Creates a Number object.
-// Deprecated.
-func NewNumber_Override(n Number, value *float64) {
+func NewAbstractClassReturner_Override(a AbstractClassReturner) {
_init_.Initialize()
_jsii_.Create(
- "@scope/jsii-calc-lib.Number",
- []interface{}{value},
- n,
+ "jsii-calc.AbstractClassReturner",
+ nil, // no parameters
+ a,
)
}
-func (n *jsiiProxy_Number) ToString() *string {
- var returns *string
+func (a *jsiiProxy_AbstractClassReturner) GiveMeAbstract() AbstractClass {
+ var returns AbstractClass
_jsii_.Invoke(
- n,
- "toString",
+ a,
+ "giveMeAbstract",
nil, // no parameters
&returns,
)
@@ -2105,12 +3125,12 @@ func (n *jsiiProxy_Number) ToString() *string {
return returns
}
-func (n *jsiiProxy_Number) TypeName() interface{} {
- var returns interface{}
+func (a *jsiiProxy_AbstractClassReturner) GiveMeInterface() IInterfaceImplementedByAbstractClass {
+ var returns IInterfaceImplementedByAbstractClass
_jsii_.Invoke(
- n,
- "typeName",
+ a,
+ "giveMeInterface",
nil, // no parameters
&returns,
)
@@ -2121,80 +3141,78 @@ func (n *jsiiProxy_Number) TypeName() interface{} {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_NumericValue.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AbstractSuite.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
-
- "github.com/aws/jsii/jsii-calc/go/jcb"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/internal"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-// Abstract class which represents a numeric value.
-// Deprecated.
-type NumericValue interface {
- jcb.Base
- // The value.
- // Deprecated.
- Value() *float64
- // String representation of the value.
- // Deprecated.
- ToString() *string
- // Returns: the name of the class (to verify native type names are created for derived classes).
- // Deprecated.
- TypeName() interface{}
+// Ensures abstract members implementations correctly register overrides in various languages.
+type AbstractSuite interface {
+ Property() *string
+ SetProperty(val *string)
+ SomeMethod(str *string) *string
+ // Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result.
+ WorkItAll(seed *string) *string
}
-// The jsii proxy struct for NumericValue
-type jsiiProxy_NumericValue struct {
- internal.Type__jcbBase
+// The jsii proxy struct for AbstractSuite
+type jsiiProxy_AbstractSuite struct {
+ _ byte // padding
}
-func (j *jsiiProxy_NumericValue) Value() *float64 {
- var returns *float64
+func (j *jsiiProxy_AbstractSuite) Property() *string {
+ var returns *string
_jsii_.Get(
j,
- "value",
+ "property",
&returns,
)
return returns
}
-// Deprecated.
-func NewNumericValue_Override(n NumericValue) {
+func NewAbstractSuite_Override(a AbstractSuite) {
_init_.Initialize()
_jsii_.Create(
- "@scope/jsii-calc-lib.NumericValue",
+ "jsii-calc.AbstractSuite",
nil, // no parameters
- n,
+ a,
)
}
-func (n *jsiiProxy_NumericValue) ToString() *string {
+func (j *jsiiProxy_AbstractSuite)SetProperty(val *string) {
+ _jsii_.Set(
+ j,
+ "property",
+ val,
+ )
+}
+
+func (a *jsiiProxy_AbstractSuite) SomeMethod(str *string) *string {
var returns *string
_jsii_.Invoke(
- n,
- "toString",
- nil, // no parameters
+ a,
+ "someMethod",
+ []interface{}{str},
&returns,
)
return returns
}
-func (n *jsiiProxy_NumericValue) TypeName() interface{} {
- var returns interface{}
+func (a *jsiiProxy_AbstractSuite) WorkItAll(seed *string) *string {
+ var returns *string
_jsii_.Invoke(
- n,
- "typeName",
- nil, // no parameters
+ a,
+ "workItAll",
+ []interface{}{seed},
&returns,
)
@@ -2204,36 +3222,60 @@ func (n *jsiiProxy_NumericValue) TypeName() interface{} {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Operation.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "jsii-calc": /go/jsiicalc/Add.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
)
-// Represents an operation on values.
-// Deprecated.
-type Operation interface {
- NumericValue
+// The "+" binary operation.
+type Add interface {
+ BinaryOperation
+ // Left-hand side operand.
+ Lhs() scopejsiicalclib.NumericValue
+ // Right-hand side operand.
+ Rhs() scopejsiicalclib.NumericValue
// The value.
- // Deprecated.
Value() *float64
+ // Say hello!
+ Hello() *string
// String representation of the value.
- // Deprecated.
ToString() *string
// Returns: the name of the class (to verify native type names are created for derived classes).
- // Deprecated.
TypeName() interface{}
}
-// The jsii proxy struct for Operation
-type jsiiProxy_Operation struct {
- jsiiProxy_NumericValue
+// The jsii proxy struct for Add
+type jsiiProxy_Add struct {
+ jsiiProxy_BinaryOperation
}
-func (j *jsiiProxy_Operation) Value() *float64 {
+func (j *jsiiProxy_Add) Lhs() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "lhs",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Add) Rhs() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "rhs",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Add) Value() *float64 {
var returns *float64
_jsii_.Get(
j,
@@ -2244,22 +3286,50 @@ func (j *jsiiProxy_Operation) Value() *float64 {
}
-// Deprecated.
-func NewOperation_Override(o Operation) {
+// Creates a BinaryOperation.
+func NewAdd(lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) Add {
_init_.Initialize()
+ j := jsiiProxy_Add{}
+
_jsii_.Create(
- "@scope/jsii-calc-lib.Operation",
+ "jsii-calc.Add",
+ []interface{}{lhs, rhs},
+ &j,
+ )
+
+ return &j
+}
+
+// Creates a BinaryOperation.
+func NewAdd_Override(a Add, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.Add",
+ []interface{}{lhs, rhs},
+ a,
+ )
+}
+
+func (a *jsiiProxy_Add) Hello() *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ a,
+ "hello",
nil, // no parameters
- o,
+ &returns,
)
+
+ return returns
}
-func (o *jsiiProxy_Operation) ToString() *string {
+func (a *jsiiProxy_Add) ToString() *string {
var returns *string
_jsii_.Invoke(
- o,
+ a,
"toString",
nil, // no parameters
&returns,
@@ -2268,11 +3338,11 @@ func (o *jsiiProxy_Operation) ToString() *string {
return returns
}
-func (o *jsiiProxy_Operation) TypeName() interface{} {
+func (a *jsiiProxy_Add) TypeName() interface{} {
var returns interface{}
_jsii_.Invoke(
- o,
+ a,
"typeName",
nil, // no parameters
&returns,
@@ -2284,1230 +3354,769 @@ func (o *jsiiProxy_Operation) TypeName() interface{} {
`;
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_StructWithOnlyOptionals.go 1`] = `
-// A simple calcuator library built on JSII.
-package scopejsiicalclib
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypes.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+import (
+ "time"
-// This is a struct with only optional properties.
-// Deprecated.
-type StructWithOnlyOptionals struct {
- // The first optional!
- // Deprecated.
- Optional1 *string \`field:"optional" json:"optional1" yaml:"optional1"\`
- // Deprecated.
- Optional2 *float64 \`field:"optional" json:"optional2" yaml:"optional2"\`
- // Deprecated.
- Optional3 *bool \`field:"optional" json:"optional3" yaml:"optional3"\`
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
+)
+
+// This class includes property for all types supported by jsii.
+//
+// The setters will validate
+// that the value set is of the expected type and throw otherwise.
+type AllTypes interface {
+ AnyArrayProperty() *[]interface{}
+ SetAnyArrayProperty(val *[]interface{})
+ AnyMapProperty() *map[string]interface{}
+ SetAnyMapProperty(val *map[string]interface{})
+ AnyProperty() interface{}
+ SetAnyProperty(val interface{})
+ ArrayProperty() *[]*string
+ SetArrayProperty(val *[]*string)
+ BooleanProperty() *bool
+ SetBooleanProperty(val *bool)
+ DateProperty() *time.Time
+ SetDateProperty(val *time.Time)
+ EnumProperty() AllTypesEnum
+ SetEnumProperty(val AllTypesEnum)
+ EnumPropertyValue() *float64
+ JsonProperty() *map[string]interface{}
+ SetJsonProperty(val *map[string]interface{})
+ MapProperty() *map[string]scopejsiicalclib.Number
+ SetMapProperty(val *map[string]scopejsiicalclib.Number)
+ NumberProperty() *float64
+ SetNumberProperty(val *float64)
+ OptionalEnumValue() StringEnum
+ SetOptionalEnumValue(val StringEnum)
+ StringProperty() *string
+ SetStringProperty(val *string)
+ UnionArrayProperty() *[]interface{}
+ SetUnionArrayProperty(val *[]interface{})
+ UnionMapProperty() *map[string]interface{}
+ SetUnionMapProperty(val *map[string]interface{})
+ UnionProperty() interface{}
+ SetUnionProperty(val interface{})
+ UnknownArrayProperty() *[]interface{}
+ SetUnknownArrayProperty(val *[]interface{})
+ UnknownMapProperty() *map[string]interface{}
+ SetUnknownMapProperty(val *map[string]interface{})
+ UnknownProperty() interface{}
+ SetUnknownProperty(val interface{})
+ AnyIn(inp interface{})
+ AnyOut() interface{}
+ EnumMethod(value StringEnum) StringEnum
}
+// The jsii proxy struct for AllTypes
+type jsiiProxy_AllTypes struct {
+ _ byte // padding
+}
-`;
+func (j *jsiiProxy_AllTypes) AnyArrayProperty() *[]interface{} {
+ var returns *[]interface{}
+ _jsii_.Get(
+ j,
+ "anyArrayProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/version 1`] = `
-0.0.0-devpreview
+func (j *jsiiProxy_AllTypes) AnyMapProperty() *map[string]interface{} {
+ var returns *map[string]interface{}
+ _jsii_.Get(
+ j,
+ "anyMapProperty",
+ &returns,
+ )
+ return returns
+}
-`;
+func (j *jsiiProxy_AllTypes) AnyProperty() interface{} {
+ var returns interface{}
+ _jsii_.Get(
+ j,
+ "anyProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = `
-
- ┗━ 📁 go
- ┗━ 📁 scopejsiicalclib
- ┣━ 📁 customsubmodulename
- ┃ ┣━ 🆕 customsubmodulename_Reflector__no_runtime_type_checking.go
- ┃ ┣━ 🆕 customsubmodulename_Reflector__runtime_type_checks.go
- ┃ ┗━ 📄 customsubmodulename_Reflector.go.diff
- ┣━ 🆕 scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go
- ┣━ 🆕 scopejsiicalclib_BaseFor2647__runtime_type_checks.go
- ┣━ 📄 scopejsiicalclib_BaseFor2647.go.diff
- ┣━ 🆕 scopejsiicalclib_Number__no_runtime_type_checking.go
- ┣━ 🆕 scopejsiicalclib_Number__runtime_type_checks.go
- ┗━ 📄 scopejsiicalclib_Number.go.diff
-`;
-
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go.diff 1`] = `
---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector.go --runtime-type-checking
-@@ -41,10 +41,13 @@
- r,
- )
- }
-
- func (r *jsiiProxy_Reflector) AsMap(reflectable IReflectable) *map[string]interface{} {
-+ if err := r.validateAsMapParameters(reflectable); err != nil {
-+ panic(err)
-+ }
- var returns *map[string]interface{}
-
- _jsii_.Invoke(
- r,
- "asMap",
-`;
+func (j *jsiiProxy_AllTypes) ArrayProperty() *[]*string {
+ var returns *[]*string
+ _jsii_.Get(
+ j,
+ "arrayProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go.diff 1`] = `
---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__no_runtime_type_checking.go --runtime-type-checking
-@@ -0,0 +1,10 @@
-+//go:build no_runtime_type_checking
-+
-+package customsubmodulename
-+
-+// Building without runtime type checking enabled, so all the below just return nil
-+
-+func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error {
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) BooleanProperty() *bool {
+ var returns *bool
+ _jsii_.Get(
+ j,
+ "booleanProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go.diff 1`] = `
---- go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/customsubmodulename/customsubmodulename_Reflector__runtime_type_checks.go --runtime-type-checking
-@@ -0,0 +1,16 @@
-+//go:build !no_runtime_type_checking
-+
-+package customsubmodulename
-+
-+import (
-+ "fmt"
-+)
-+
-+func (r *jsiiProxy_Reflector) validateAsMapParameters(reflectable IReflectable) error {
-+ if reflectable == nil {
-+ return fmt.Errorf("parameter reflectable is required, but nil was provided")
-+ }
-+
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) DateProperty() *time.Time {
+ var returns *time.Time
+ _jsii_.Get(
+ j,
+ "dateProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647.go --runtime-type-checking
-@@ -29,10 +29,13 @@
-
- // Deprecated.
- func NewBaseFor2647(very scopejsiicalcbaseofbase.Very) BaseFor2647 {
- _init_.Initialize()
-
-+ if err := validateNewBaseFor2647Parameters(very); err != nil {
-+ panic(err)
-+ }
- j := jsiiProxy_BaseFor2647{}
-
- _jsii_.Create(
- "@scope/jsii-calc-lib.BaseFor2647",
- []interface{}{very},
-@@ -52,10 +55,13 @@
- b,
- )
- }
-
- func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) {
-+ if err := b.validateFooParameters(obj); err != nil {
-+ panic(err)
-+ }
- _jsii_.InvokeVoid(
- b,
- "foo",
- []interface{}{obj},
- )
-`;
+func (j *jsiiProxy_AllTypes) EnumProperty() AllTypesEnum {
+ var returns AllTypesEnum
+ _jsii_.Get(
+ j,
+ "enumProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__no_runtime_type_checking.go --runtime-type-checking
-@@ -0,0 +1,15 @@
-+//go:build no_runtime_type_checking
-+
-+// A simple calcuator library built on JSII.
-+package scopejsiicalclib
-+
-+// Building without runtime type checking enabled, so all the below just return nil
-+
-+func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error {
-+ return nil
-+}
-+
-+func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error {
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) EnumPropertyValue() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "enumPropertyValue",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_BaseFor2647__runtime_type_checks.go --runtime-type-checking
-@@ -0,0 +1,28 @@
-+//go:build !no_runtime_type_checking
-+
-+// A simple calcuator library built on JSII.
-+package scopejsiicalclib
-+
-+import (
-+ "fmt"
-+
-+ "github.com/aws/jsii/jsii-calc/go/jcb"
-+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2"
-+)
-+
-+func (b *jsiiProxy_BaseFor2647) validateFooParameters(obj jcb.IBaseInterface) error {
-+ if obj == nil {
-+ return fmt.Errorf("parameter obj is required, but nil was provided")
-+ }
-+
-+ return nil
-+}
-+
-+func validateNewBaseFor2647Parameters(very scopejsiicalcbaseofbase.Very) error {
-+ if very == nil {
-+ return fmt.Errorf("parameter very is required, but nil was provided")
-+ }
-+
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) JsonProperty() *map[string]interface{} {
+ var returns *map[string]interface{}
+ _jsii_.Get(
+ j,
+ "jsonProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_Number.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_Number.go --runtime-type-checking
-@@ -55,10 +55,13 @@
- // Creates a Number object.
- // Deprecated.
- func NewNumber(value *float64) Number {
- _init_.Initialize()
-
-+ if err := validateNewNumberParameters(value); err != nil {
-+ panic(err)
-+ }
- j := jsiiProxy_Number{}
-
- _jsii_.Create(
- "@scope/jsii-calc-lib.Number",
- []interface{}{value},
-`;
+func (j *jsiiProxy_AllTypes) MapProperty() *map[string]scopejsiicalclib.Number {
+ var returns *map[string]scopejsiicalclib.Number
+ _jsii_.Get(
+ j,
+ "mapProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_Number__no_runtime_type_checking.go --runtime-type-checking
-@@ -0,0 +1,11 @@
-+//go:build no_runtime_type_checking
-+
-+// A simple calcuator library built on JSII.
-+package scopejsiicalclib
-+
-+// Building without runtime type checking enabled, so all the below just return nil
-+
-+func validateNewNumberParameters(value *float64) error {
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) NumberProperty() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "numberProperty",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go.diff 1`] = `
---- go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go --no-runtime-type-checking
-+++ go/scopejsiicalclib/scopejsiicalclib_Number__runtime_type_checks.go --runtime-type-checking
-@@ -0,0 +1,17 @@
-+//go:build !no_runtime_type_checking
-+
-+// A simple calcuator library built on JSII.
-+package scopejsiicalclib
-+
-+import (
-+ "fmt"
-+)
-+
-+func validateNewNumberParameters(value *float64) error {
-+ if value == nil {
-+ return fmt.Errorf("parameter value is required, but nil was provided")
-+ }
-+
-+ return nil
-+}
-+
-`;
+func (j *jsiiProxy_AllTypes) OptionalEnumValue() StringEnum {
+ var returns StringEnum
+ _jsii_.Get(
+ j,
+ "optionalEnumValue",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "jsii-calc": / 1`] = `
-
- ┗━ 📁 go
- ┗━ 📁 jsiicalc
- ┣━ 📁 anonymous
- ┃ ┣━ 📄 anonymous_IOptionA.go
- ┃ ┣━ 📄 anonymous_IOptionB.go
- ┃ ┣━ 📄 anonymous_UseOptions.go
- ┃ ┗━ 📄 anonymous.go
- ┣━ 📁 cdk16625
- ┃ ┣━ 📄 cdk16625_Cdk16625.go
- ┃ ┣━ 📄 cdk16625.go
- ┃ ┗━ 📁 donotimport
- ┃ ┣━ 📄 donotimport_UnimportedSubmoduleType.go
- ┃ ┣━ 📄 donotimport.go
- ┃ ┗━ 📁 internal
- ┃ ┗━ 📄 types.go
- ┣━ 📁 cdk22369
- ┃ ┣━ 📄 cdk22369_AcceptsPath.go
- ┃ ┣━ 📄 cdk22369_AcceptsPathProps.go
- ┃ ┗━ 📄 cdk22369.go
- ┣━ 📁 composition
- ┃ ┣━ 📄 composition_CompositeOperation_CompositionStringStyle.go
- ┃ ┣━ 📄 composition_CompositeOperation.go
- ┃ ┣━ 📄 composition.go
- ┃ ┗━ 📁 internal
- ┃ ┗━ 📄 types.go
- ┣━ 📁 derivedclasshasnoproperties
- ┃ ┣━ 📄 derivedclasshasnoproperties_Base.go
- ┃ ┣━ 📄 derivedclasshasnoproperties_Derived.go
- ┃ ┗━ 📄 derivedclasshasnoproperties.go
- ┣━ 📄 go.mod
- ┣━ 📁 homonymousforwardreferences
- ┃ ┣━ 📁 bar
- ┃ ┃ ┣━ 📄 bar_Consumer.go
- ┃ ┃ ┣━ 📄 bar_ConsumerProps.go
- ┃ ┃ ┣━ 📄 bar_Homonymous.go
- ┃ ┃ ┗━ 📄 bar.go
- ┃ ┣━ 📁 foo
- ┃ ┃ ┣━ 📄 foo_Consumer.go
- ┃ ┃ ┣━ 📄 foo_ConsumerProps.go
- ┃ ┃ ┣━ 📄 foo_Homonymous.go
- ┃ ┃ ┗━ 📄 foo.go
- ┃ ┗━ 📄 README.md
- ┣━ 📁 interfaceinnamespaceincludesclasses
- ┃ ┣━ 📄 interfaceinnamespaceincludesclasses_Foo.go
- ┃ ┣━ 📄 interfaceinnamespaceincludesclasses_Hello.go
- ┃ ┗━ 📄 interfaceinnamespaceincludesclasses.go
- ┣━ 📁 interfaceinnamespaceonlyinterface
- ┃ ┣━ 📄 interfaceinnamespaceonlyinterface_Hello.go
- ┃ ┗━ 📄 interfaceinnamespaceonlyinterface.go
- ┣━ 📁 internal
- ┃ ┗━ 📄 types.go
- ┣━ 📁 jsii
- ┃ ┣━ 📄 jsii-calc-3.20.120.tgz
- ┃ ┗━ 📄 jsii.go
- ┣━ 📁 jsii3656
- ┃ ┣━ 📄 jsii3656_ImplementMeOpts.go
- ┃ ┣━ 📄 jsii3656_OverrideMe.go
- ┃ ┗━ 📄 jsii3656.go
- ┣━ 📄 jsiicalc_AbstractClass.go
- ┣━ 📄 jsiicalc_AbstractClassBase.go
- ┣━ 📄 jsiicalc_AbstractClassReturner.go
- ┣━ 📄 jsiicalc_AbstractSuite.go
- ┣━ 📄 jsiicalc_Add.go
- ┣━ 📄 jsiicalc_AllowedMethodNames.go
- ┣━ 📄 jsiicalc_AllTypes.go
- ┣━ 📄 jsiicalc_AllTypesEnum.go
- ┣━ 📄 jsiicalc_AmbiguousParameters.go
- ┣━ 📄 jsiicalc_AnonymousImplementationProvider.go
- ┣━ 📄 jsiicalc_AsyncVirtualMethods.go
- ┣━ 📄 jsiicalc_AugmentableClass.go
- ┣━ 📄 jsiicalc_BaseClass.go
- ┣━ 📄 jsiicalc_BaseJsii976.go
- ┣━ 📄 jsiicalc_Bell.go
- ┣━ 📄 jsiicalc_BinaryOperation.go
- ┣━ 📄 jsiicalc_BurriedAnonymousObject.go
- ┣━ 📄 jsiicalc_Calculator.go
- ┣━ 📄 jsiicalc_CalculatorProps.go
- ┣━ 📄 jsiicalc_ChildStruct982.go
- ┣━ 📄 jsiicalc_ClassThatImplementsTheInternalInterface.go
- ┣━ 📄 jsiicalc_ClassThatImplementsThePrivateInterface.go
- ┣━ 📄 jsiicalc_ClassWithCollectionOfUnions.go
- ┣━ 📄 jsiicalc_ClassWithCollections.go
- ┣━ 📄 jsiicalc_ClassWithContainerTypes.go
- ┣━ 📄 jsiicalc_ClassWithDocs.go
- ┣━ 📄 jsiicalc_ClassWithJavaReservedWords.go
- ┣━ 📄 jsiicalc_ClassWithMutableObjectLiteralProperty.go
- ┣━ 📄 jsiicalc_ClassWithNestedUnion.go
- ┣━ 📄 jsiicalc_ClassWithPrivateConstructorAndAutomaticProperties.go
- ┣━ 📄 jsiicalc_ConfusingToJackson.go
- ┣━ 📄 jsiicalc_ConfusingToJacksonStruct.go
- ┣━ 📄 jsiicalc_ConstructorPassesThisOut.go
- ┣━ 📄 jsiicalc_Constructors.go
- ┣━ 📄 jsiicalc_ConsumePureInterface.go
- ┣━ 📄 jsiicalc_ConsumerCanRingBell.go
- ┣━ 📄 jsiicalc_ConsumersOfThisCrazyTypeSystem.go
- ┣━ 📄 jsiicalc_ContainerProps.go
- ┣━ 📄 jsiicalc_DataRenderer.go
- ┣━ 📄 jsiicalc_Default.go
- ┣━ 📄 jsiicalc_DefaultedConstructorArgument.go
- ┣━ 📄 jsiicalc_Demonstrate982.go
- ┣━ 📄 jsiicalc_DeprecatedClass.go
- ┣━ 📄 jsiicalc_DeprecatedEnum.go
- ┣━ 📄 jsiicalc_DeprecatedStruct.go
- ┣━ 📄 jsiicalc_DerivedStruct.go
- ┣━ 📄 jsiicalc_DiamondBottom.go
- ┣━ 📄 jsiicalc_DiamondInheritanceBaseLevelStruct.go
- ┣━ 📄 jsiicalc_DiamondInheritanceFirstMidLevelStruct.go
- ┣━ 📄 jsiicalc_DiamondInheritanceSecondMidLevelStruct.go
- ┣━ 📄 jsiicalc_DiamondInheritanceTopLevelStruct.go
- ┣━ 📄 jsiicalc_DisappointingCollectionSource.go
- ┣━ 📄 jsiicalc_DocumentedClass.go
- ┣━ 📄 jsiicalc_DoNotOverridePrivates.go
- ┣━ 📄 jsiicalc_DoNotRecognizeAnyAsOptional.go
- ┣━ 📄 jsiicalc_DontComplainAboutVariadicAfterOptional.go
- ┣━ 📄 jsiicalc_DoubleTrouble.go
- ┣━ 📄 jsiicalc_DummyObj.go
- ┣━ 📄 jsiicalc_DynamicPropertyBearer.go
- ┣━ 📄 jsiicalc_DynamicPropertyBearerChild.go
- ┣━ 📄 jsiicalc_Entropy.go
- ┣━ 📄 jsiicalc_EnumDispenser.go
- ┣━ 📄 jsiicalc_EraseUndefinedHashValues.go
- ┣━ 📄 jsiicalc_EraseUndefinedHashValuesOptions.go
- ┣━ 📄 jsiicalc_ExperimentalClass.go
- ┣━ 📄 jsiicalc_ExperimentalEnum.go
- ┣━ 📄 jsiicalc_ExperimentalStruct.go
- ┣━ 📄 jsiicalc_ExportedBaseClass.go
- ┣━ 📄 jsiicalc_ExtendsInternalInterface.go
- ┣━ 📄 jsiicalc_ExternalClass.go
- ┣━ 📄 jsiicalc_ExternalEnum.go
- ┣━ 📄 jsiicalc_ExternalStruct.go
- ┣━ 📄 jsiicalc_FullCombo.go
- ┣━ 📄 jsiicalc_GiveMeStructs.go
- ┣━ 📄 jsiicalc_Greetee.go
- ┣━ 📄 jsiicalc_GreetingAugmenter.go
- ┣━ 📄 jsiicalc_IAnonymousImplementationProvider.go
- ┣━ 📄 jsiicalc_IAnonymouslyImplementMe.go
- ┣━ 📄 jsiicalc_IAnotherPublicInterface.go
- ┣━ 📄 jsiicalc_IBell.go
- ┣━ 📄 jsiicalc_IBellRinger.go
- ┣━ 📄 jsiicalc_IConcreteBellRinger.go
- ┣━ 📄 jsiicalc_IDeprecatedInterface.go
- ┣━ 📄 jsiicalc_IExperimentalInterface.go
- ┣━ 📄 jsiicalc_IExtendsPrivateInterface.go
- ┣━ 📄 jsiicalc_IExternalInterface.go
- ┣━ 📄 jsiicalc_IFriendlier.go
- ┣━ 📄 jsiicalc_IFriendlyRandomGenerator.go
- ┣━ 📄 jsiicalc_IIndirectlyImplemented.go
- ┣━ 📄 jsiicalc_IInterfaceImplementedByAbstractClass.go
- ┣━ 📄 jsiicalc_IInterfaceThatShouldNotBeADataType.go
- ┣━ 📄 jsiicalc_IInterfaceWithInternal.go
- ┣━ 📄 jsiicalc_IInterfaceWithMethods.go
- ┣━ 📄 jsiicalc_IInterfaceWithOptionalMethodArguments.go
- ┣━ 📄 jsiicalc_IInterfaceWithProperties.go
- ┣━ 📄 jsiicalc_IInterfaceWithPropertiesExtension.go
- ┣━ 📄 jsiicalc_IJavaReservedWordsInAnInterface.go
- ┣━ 📄 jsiicalc_IJSII417Derived.go
- ┣━ 📄 jsiicalc_IJSII417PublicBaseOfBase.go
- ┣━ 📄 jsiicalc_IJsii487External.go
- ┣━ 📄 jsiicalc_IJsii487External2.go
- ┣━ 📄 jsiicalc_IJsii496.go
- ┣━ 📄 jsiicalc_Implementation.go
- ┣━ 📄 jsiicalc_ImplementInternalInterface.go
- ┣━ 📄 jsiicalc_ImplementsInterfaceWithInternal.go
- ┣━ 📄 jsiicalc_ImplementsInterfaceWithInternalSubclass.go
- ┣━ 📄 jsiicalc_ImplementsPrivateInterface.go
- ┣━ 📄 jsiicalc_ImplictBaseOfBase.go
- ┣━ 📄 jsiicalc_IMutableObjectLiteral.go
- ┣━ 📄 jsiicalc_InbetweenClass.go
- ┣━ 📄 jsiicalc_INonInternalInterface.go
- ┣━ 📄 jsiicalc_InterfaceCollections.go
- ┣━ 📄 jsiicalc_InterfacesMaker.go
- ┣━ 📄 jsiicalc_IObjectWithProperty.go
- ┣━ 📄 jsiicalc_IOptionalMethod.go
- ┣━ 📄 jsiicalc_IPrivatelyImplemented.go
- ┣━ 📄 jsiicalc_IPublicInterface.go
- ┣━ 📄 jsiicalc_IPublicInterface2.go
- ┣━ 📄 jsiicalc_IRandomNumberGenerator.go
- ┣━ 📄 jsiicalc_IReturnJsii976.go
- ┣━ 📄 jsiicalc_IReturnsNumber.go
- ┣━ 📄 jsiicalc_Isomorphism.go
- ┣━ 📄 jsiicalc_Issue2638.go
- ┣━ 📄 jsiicalc_Issue2638B.go
- ┣━ 📄 jsiicalc_IStableInterface.go
- ┣━ 📄 jsiicalc_IStructReturningDelegate.go
- ┣━ 📄 jsiicalc_IWallClock.go
- ┣━ 📄 jsiicalc_JavaReservedWords.go
- ┣━ 📄 jsiicalc_JSII417Derived.go
- ┣━ 📄 jsiicalc_JSII417PublicBaseOfBase.go
- ┣━ 📄 jsiicalc_Jsii487Derived.go
- ┣━ 📄 jsiicalc_Jsii496Derived.go
- ┣━ 📄 jsiicalc_JsiiAgent.go
- ┣━ 📄 jsiicalc_JSObjectLiteralForInterface.go
- ┣━ 📄 jsiicalc_JSObjectLiteralToNative.go
- ┣━ 📄 jsiicalc_JSObjectLiteralToNativeClass.go
- ┣━ 📄 jsiicalc_JsonFormatter.go
- ┣━ 📄 jsiicalc_LevelOne_PropBooleanValue.go
- ┣━ 📄 jsiicalc_LevelOne_PropProperty.go
- ┣━ 📄 jsiicalc_LevelOne.go
- ┣━ 📄 jsiicalc_LevelOneProps.go
- ┣━ 📄 jsiicalc_LoadBalancedFargateServiceProps.go
- ┣━ 📄 jsiicalc_MethodNamedProperty.go
- ┣━ 📄 jsiicalc_Multiply.go
- ┣━ 📄 jsiicalc_Negate.go
- ┣━ 📄 jsiicalc_NestedClassInstance.go
- ┣━ 📄 jsiicalc_NestedStruct.go
- ┣━ 📄 jsiicalc_NodeStandardLibrary.go
- ┣━ 📄 jsiicalc_NullShouldBeTreatedAsUndefined.go
- ┣━ 📄 jsiicalc_NullShouldBeTreatedAsUndefinedData.go
- ┣━ 📄 jsiicalc_NumberGenerator.go
- ┣━ 📄 jsiicalc_ObjectRefsInCollections.go
- ┣━ 📄 jsiicalc_ObjectWithPropertyProvider.go
- ┣━ 📄 jsiicalc_Old.go
- ┣━ 📄 jsiicalc_OptionalArgumentInvoker.go
- ┣━ 📄 jsiicalc_OptionalConstructorArgument.go
- ┣━ 📄 jsiicalc_OptionalStruct.go
- ┣━ 📄 jsiicalc_OptionalStructConsumer.go
- ┣━ 📄 jsiicalc_OverridableProtectedMember.go
- ┣━ 📄 jsiicalc_OverrideReturnsObject.go
- ┣━ 📄 jsiicalc_ParamShadowsBuiltins.go
- ┣━ 📄 jsiicalc_ParamShadowsBuiltinsProps.go
- ┣━ 📄 jsiicalc_ParamShadowsScope.go
- ┣━ 📄 jsiicalc_ParentStruct982.go
- ┣━ 📄 jsiicalc_PartiallyInitializedThisConsumer.go
- ┣━ 📄 jsiicalc_Polymorphism.go
- ┣━ 📄 jsiicalc_Power.go
- ┣━ 📄 jsiicalc_PromiseNothing.go
- ┣━ 📄 jsiicalc_PropertyNamedProperty.go
- ┣━ 📄 jsiicalc_PublicClass.go
- ┣━ 📄 jsiicalc_PythonReservedWords.go
- ┣━ 📄 jsiicalc_ReferenceEnumFromScopedPackage.go
- ┣━ 📄 jsiicalc_ReturnsPrivateImplementationOfInterface.go
- ┣━ 📄 jsiicalc_RootStruct.go
- ┣━ 📄 jsiicalc_RootStructValidator.go
- ┣━ 📄 jsiicalc_RuntimeTypeChecking.go
- ┣━ 📄 jsiicalc_SecondLevelStruct.go
- ┣━ 📄 jsiicalc_SingleInstanceTwoTypes.go
- ┣━ 📄 jsiicalc_SingletonInt.go
- ┣━ 📄 jsiicalc_SingletonIntEnum.go
- ┣━ 📄 jsiicalc_SingletonString.go
- ┣━ 📄 jsiicalc_SingletonStringEnum.go
- ┣━ 📄 jsiicalc_SmellyStruct.go
- ┣━ 📄 jsiicalc_SomeTypeJsii976.go
- ┣━ 📄 jsiicalc_StableClass.go
- ┣━ 📄 jsiicalc_StableEnum.go
- ┣━ 📄 jsiicalc_StableStruct.go
- ┣━ 📄 jsiicalc_StaticContext.go
- ┣━ 📄 jsiicalc_StaticHelloChild.go
- ┣━ 📄 jsiicalc_StaticHelloParent.go
- ┣━ 📄 jsiicalc_Statics.go
- ┣━ 📄 jsiicalc_StringEnum.go
- ┣━ 📄 jsiicalc_StripInternal.go
- ┣━ 📄 jsiicalc_StructA.go
- ┣━ 📄 jsiicalc_StructB.go
- ┣━ 📄 jsiicalc_StructParameterType.go
- ┣━ 📄 jsiicalc_StructPassing.go
- ┣━ 📄 jsiicalc_StructUnionConsumer.go
- ┣━ 📄 jsiicalc_StructWithCollectionOfUnionts.go
- ┣━ 📄 jsiicalc_StructWithEnum.go
- ┣━ 📄 jsiicalc_StructWithJavaReservedWords.go
- ┣━ 📄 jsiicalc_Sum.go
- ┣━ 📄 jsiicalc_SupportsNiceJavaBuilder.go
- ┣━ 📄 jsiicalc_SupportsNiceJavaBuilderProps.go
- ┣━ 📄 jsiicalc_SupportsNiceJavaBuilderWithRequiredProps.go
- ┣━ 📄 jsiicalc_SyncVirtualMethods.go
- ┣━ 📄 jsiicalc_TestStructWithEnum.go
- ┣━ 📄 jsiicalc_Thrower.go
- ┣━ 📄 jsiicalc_TopLevelStruct.go
- ┣━ 📄 jsiicalc_TwoMethodsWithSimilarCapitalization.go
- ┣━ 📄 jsiicalc_UmaskCheck.go
- ┣━ 📄 jsiicalc_UnaryOperation.go
- ┣━ 📄 jsiicalc_UnionProperties.go
- ┣━ 📄 jsiicalc_UpcasingReflectable.go
- ┣━ 📄 jsiicalc_UseBundledDependency.go
- ┣━ 📄 jsiicalc_UseCalcBase.go
- ┣━ 📄 jsiicalc_UsesInterfaceWithProperties.go
- ┣━ 📄 jsiicalc_VariadicInvoker.go
- ┣━ 📄 jsiicalc_VariadicMethod.go
- ┣━ 📄 jsiicalc_VariadicTypeUnion.go
- ┣━ 📄 jsiicalc_VirtualMethodPlayground.go
- ┣━ 📄 jsiicalc_VoidCallback.go
- ┣━ 📄 jsiicalc_WithPrivatePropertyInConstructor.go
- ┣━ 📄 jsiicalc.go
- ┣━ 📄 LICENSE
- ┣━ 📁 module2530
- ┃ ┣━ 📄 module2530_MyClass.go
- ┃ ┗━ 📄 module2530.go
- ┣━ 📁 module2617
- ┃ ┣━ 📄 module2617_OnlyStatics.go
- ┃ ┗━ 📄 module2617.go
- ┣━ 📁 module2647
- ┃ ┣━ 📁 internal
- ┃ ┃ ┗━ 📄 types.go
- ┃ ┣━ 📄 module2647_ExtendAndImplement.go
- ┃ ┗━ 📄 module2647.go
- ┣━ 📁 module2689
- ┃ ┣━ 📁 methods
- ┃ ┃ ┣━ 📄 methods_MyClass.go
- ┃ ┃ ┗━ 📄 methods.go
- ┃ ┣━ 📁 props
- ┃ ┃ ┣━ 📄 props_MyClass.go
- ┃ ┃ ┗━ 📄 props.go
- ┃ ┣━ 📁 retval
- ┃ ┃ ┣━ 📄 retval_MyClass.go
- ┃ ┃ ┗━ 📄 retval.go
- ┃ ┗━ 📁 structs
- ┃ ┣━ 📄 structs_MyStruct.go
- ┃ ┗━ 📄 structs.go
- ┣━ 📁 module2692
- ┃ ┣━ 📁 submodule1
- ┃ ┃ ┣━ 📄 submodule1_Bar.go
- ┃ ┃ ┗━ 📄 submodule1.go
- ┃ ┗━ 📁 submodule2
- ┃ ┣━ 📄 submodule2_Bar.go
- ┃ ┣━ 📄 submodule2_Foo.go
- ┃ ┗━ 📄 submodule2.go
- ┣━ 📁 module2700
- ┃ ┣━ 📄 module2700_Base.go
- ┃ ┣━ 📄 module2700_Derived.go
- ┃ ┣━ 📄 module2700_IFoo.go
- ┃ ┗━ 📄 module2700.go
- ┣━ 📁 module2702
- ┃ ┣━ 📁 internal
- ┃ ┃ ┗━ 📄 types.go
- ┃ ┣━ 📄 module2702_Baz.go
- ┃ ┣━ 📄 module2702_Class1.go
- ┃ ┣━ 📄 module2702_Class2.go
- ┃ ┣━ 📄 module2702_Class3.go
- ┃ ┣━ 📄 module2702_Construct.go
- ┃ ┣━ 📄 module2702_IBaz.go
- ┃ ┣━ 📄 module2702_IConstruct.go
- ┃ ┣━ 📄 module2702_IFoo.go
- ┃ ┣━ 📄 module2702_IResource.go
- ┃ ┣━ 📄 module2702_IVpc.go
- ┃ ┣━ 📄 module2702_Resource.go
- ┃ ┣━ 📄 module2702_Vpc.go
- ┃ ┗━ 📄 module2702.go
- ┣━ 📁 nodirect
- ┃ ┣━ 📁 sub1
- ┃ ┃ ┣━ 📄 sub1_TypeFromSub1.go
- ┃ ┃ ┗━ 📄 sub1.go
- ┃ ┗━ 📁 sub2
- ┃ ┣━ 📄 sub2_TypeFromSub2.go
- ┃ ┗━ 📄 sub2.go
- ┣━ 📄 NOTICE
- ┣━ 📁 onlystatic
- ┃ ┣━ 📄 onlystatic_OnlyStaticMethods.go
- ┃ ┗━ 📄 onlystatic.go
- ┣━ 📁 pythonself
- ┃ ┣━ 📄 pythonself_ClassWithSelf.go
- ┃ ┣━ 📄 pythonself_ClassWithSelfKwarg.go
- ┃ ┣━ 📄 pythonself_IInterfaceWithSelf.go
- ┃ ┣━ 📄 pythonself_StructWithSelf.go
- ┃ ┗━ 📄 pythonself.go
- ┣━ 📄 README.md
- ┣━ 📁 submodule
- ┃ ┣━ 📁 backreferences
- ┃ ┃ ┣━ 📄 backreferences_MyClassReference.go
- ┃ ┃ ┗━ 📄 backreferences.go
- ┃ ┣━ 📁 child
- ┃ ┃ ┣━ 📄 child_Awesomeness.go
- ┃ ┃ ┣━ 📄 child_Goodness.go
- ┃ ┃ ┣━ 📄 child_InnerClass.go
- ┃ ┃ ┣━ 📄 child_KwargsProps.go
- ┃ ┃ ┣━ 📄 child_OuterClass.go
- ┃ ┃ ┣━ 📄 child_SomeEnum.go
- ┃ ┃ ┣━ 📄 child_SomeStruct.go
- ┃ ┃ ┣━ 📄 child_Structure.go
- ┃ ┃ ┗━ 📄 child.go
- ┃ ┣━ 📁 internal
- ┃ ┃ ┗━ 📄 types.go
- ┃ ┣━ 📁 isolated
- ┃ ┃ ┣━ 📄 isolated_Kwargs.go
- ┃ ┃ ┣━ 📄 isolated.go
- ┃ ┃ ┗━ 📄 README.md
- ┃ ┣━ 📁 nestedsubmodule
- ┃ ┃ ┣━ 📁 deeplynested
- ┃ ┃ ┃ ┣━ 📄 deeplynested_INamespaced.go
- ┃ ┃ ┃ ┗━ 📄 deeplynested.go
- ┃ ┃ ┣━ 📁 internal
- ┃ ┃ ┃ ┗━ 📄 types.go
- ┃ ┃ ┣━ 📄 nestedsubmodule_Namespaced.go
- ┃ ┃ ┗━ 📄 nestedsubmodule.go
- ┃ ┣━ 📁 param
- ┃ ┃ ┣━ 📄 param_SpecialParameter.go
- ┃ ┃ ┗━ 📄 param.go
- ┃ ┣━ 📄 README.md
- ┃ ┣━ 📁 returnsparam
- ┃ ┃ ┣━ 📄 returnsparam_ReturnsSpecialParameter.go
- ┃ ┃ ┗━ 📄 returnsparam.go
- ┃ ┣━ 📄 submodule_Default.go
- ┃ ┣━ 📄 submodule_MyClass.go
- ┃ ┗━ 📄 submodule.go
- ┣━ 📁 union
- ┃ ┣━ 📄 union_ConsumesUnion.go
- ┃ ┣━ 📄 union_IResolvable.go
- ┃ ┣━ 📄 union_Resolvable.go
- ┃ ┗━ 📄 union.go
- ┗━ 📄 version
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/LICENSE 1`] = `
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
+func (j *jsiiProxy_AllTypes) StringProperty() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "stringProperty",
+ &returns,
+ )
+ return returns
+}
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
+func (j *jsiiProxy_AllTypes) UnionArrayProperty() *[]interface{} {
+ var returns *[]interface{}
+ _jsii_.Get(
+ j,
+ "unionArrayProperty",
+ &returns,
+ )
+ return returns
+}
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
+func (j *jsiiProxy_AllTypes) UnionMapProperty() *map[string]interface{} {
+ var returns *map[string]interface{}
+ _jsii_.Get(
+ j,
+ "unionMapProperty",
+ &returns,
+ )
+ return returns
+}
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
+func (j *jsiiProxy_AllTypes) UnionProperty() interface{} {
+ var returns interface{}
+ _jsii_.Get(
+ j,
+ "unionProperty",
+ &returns,
+ )
+ return returns
+}
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
+func (j *jsiiProxy_AllTypes) UnknownArrayProperty() *[]interface{} {
+ var returns *[]interface{}
+ _jsii_.Get(
+ j,
+ "unknownArrayProperty",
+ &returns,
+ )
+ return returns
+}
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
+func (j *jsiiProxy_AllTypes) UnknownMapProperty() *map[string]interface{} {
+ var returns *map[string]interface{}
+ _jsii_.Get(
+ j,
+ "unknownMapProperty",
+ &returns,
+ )
+ return returns
+}
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
+func (j *jsiiProxy_AllTypes) UnknownProperty() interface{} {
+ var returns interface{}
+ _jsii_.Get(
+ j,
+ "unknownProperty",
+ &returns,
+ )
+ return returns
+}
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
+func NewAllTypes() AllTypes {
+ _init_.Initialize()
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
+ j := jsiiProxy_AllTypes{}
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
+ _jsii_.Create(
+ "jsii-calc.AllTypes",
+ nil, // no parameters
+ &j,
+ )
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
+ return &j
+}
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
+func NewAllTypes_Override(a AllTypes) {
+ _init_.Initialize()
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
+ _jsii_.Create(
+ "jsii-calc.AllTypes",
+ nil, // no parameters
+ a,
+ )
+}
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
+func (j *jsiiProxy_AllTypes)SetAnyArrayProperty(val *[]interface{}) {
+ _jsii_.Set(
+ j,
+ "anyArrayProperty",
+ val,
+ )
+}
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
+func (j *jsiiProxy_AllTypes)SetAnyMapProperty(val *map[string]interface{}) {
+ _jsii_.Set(
+ j,
+ "anyMapProperty",
+ val,
+ )
+}
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
+func (j *jsiiProxy_AllTypes)SetAnyProperty(val interface{}) {
+ _jsii_.Set(
+ j,
+ "anyProperty",
+ val,
+ )
+}
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
+func (j *jsiiProxy_AllTypes)SetArrayProperty(val *[]*string) {
+ _jsii_.Set(
+ j,
+ "arrayProperty",
+ val,
+ )
+}
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
+func (j *jsiiProxy_AllTypes)SetBooleanProperty(val *bool) {
+ _jsii_.Set(
+ j,
+ "booleanProperty",
+ val,
+ )
+}
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
+func (j *jsiiProxy_AllTypes)SetDateProperty(val *time.Time) {
+ _jsii_.Set(
+ j,
+ "dateProperty",
+ val,
+ )
+}
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
+func (j *jsiiProxy_AllTypes)SetEnumProperty(val AllTypesEnum) {
+ _jsii_.Set(
+ j,
+ "enumProperty",
+ val,
+ )
+}
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
+func (j *jsiiProxy_AllTypes)SetJsonProperty(val *map[string]interface{}) {
+ _jsii_.Set(
+ j,
+ "jsonProperty",
+ val,
+ )
+}
- END OF TERMS AND CONDITIONS
+func (j *jsiiProxy_AllTypes)SetMapProperty(val *map[string]scopejsiicalclib.Number) {
+ _jsii_.Set(
+ j,
+ "mapProperty",
+ val,
+ )
+}
- APPENDIX: How to apply the Apache License to your work.
+func (j *jsiiProxy_AllTypes)SetNumberProperty(val *float64) {
+ _jsii_.Set(
+ j,
+ "numberProperty",
+ val,
+ )
+}
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
+func (j *jsiiProxy_AllTypes)SetOptionalEnumValue(val StringEnum) {
+ _jsii_.Set(
+ j,
+ "optionalEnumValue",
+ val,
+ )
+}
- Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+func (j *jsiiProxy_AllTypes)SetStringProperty(val *string) {
+ _jsii_.Set(
+ j,
+ "stringProperty",
+ val,
+ )
+}
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+func (j *jsiiProxy_AllTypes)SetUnionArrayProperty(val *[]interface{}) {
+ _jsii_.Set(
+ j,
+ "unionArrayProperty",
+ val,
+ )
+}
- http://www.apache.org/licenses/LICENSE-2.0
+func (j *jsiiProxy_AllTypes)SetUnionMapProperty(val *map[string]interface{}) {
+ _jsii_.Set(
+ j,
+ "unionMapProperty",
+ val,
+ )
+}
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-`;
+func (j *jsiiProxy_AllTypes)SetUnionProperty(val interface{}) {
+ _jsii_.Set(
+ j,
+ "unionProperty",
+ val,
+ )
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/NOTICE 1`] = `
-jsii
-Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+func (j *jsiiProxy_AllTypes)SetUnknownArrayProperty(val *[]interface{}) {
+ _jsii_.Set(
+ j,
+ "unknownArrayProperty",
+ val,
+ )
+}
-`;
+func (j *jsiiProxy_AllTypes)SetUnknownMapProperty(val *map[string]interface{}) {
+ _jsii_.Set(
+ j,
+ "unknownMapProperty",
+ val,
+ )
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/README.md 1`] = `
-# jsii Calculator
+func (j *jsiiProxy_AllTypes)SetUnknownProperty(val interface{}) {
+ _jsii_.Set(
+ j,
+ "unknownProperty",
+ val,
+ )
+}
-This library is used to demonstrate and test the features of JSII
+func (a *jsiiProxy_AllTypes) AnyIn(inp interface{}) {
+ _jsii_.InvokeVoid(
+ a,
+ "anyIn",
+ []interface{}{inp},
+ )
+}
-## How to use running sum API:
+func (a *jsiiProxy_AllTypes) AnyOut() interface{} {
+ var returns interface{}
-First, create a calculator:
+ _jsii_.Invoke(
+ a,
+ "anyOut",
+ nil, // no parameters
+ &returns,
+ )
-\`\`\`go
-calculator := calc.NewCalculator()
-\`\`\`
+ return returns
+}
-Then call some operations:
+func (a *jsiiProxy_AllTypes) EnumMethod(value StringEnum) StringEnum {
+ var returns StringEnum
-\`\`\`go
-calculator.Add(jsii.Number(10))
-\`\`\`
+ _jsii_.Invoke(
+ a,
+ "enumMethod",
+ []interface{}{value},
+ &returns,
+ )
-## Code Samples
+ return returns
+}
-\`\`\`go
-/* This is totes a magic comment in here, just you wait! */
-foo := "bar"
-\`\`\`
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous.go 1`] = `
-package anonymous
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AllTypesEnum.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
-import (
- "reflect"
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+type AllTypesEnum string
+
+const (
+ AllTypesEnum_MY_ENUM_VALUE AllTypesEnum = "MY_ENUM_VALUE"
+ AllTypesEnum_YOUR_ENUM_VALUE AllTypesEnum = "YOUR_ENUM_VALUE"
+ AllTypesEnum_THIS_IS_GREAT AllTypesEnum = "THIS_IS_GREAT"
)
-func init() {
- _jsii_.RegisterInterface(
- "jsii-calc.anonymous.IOptionA",
- reflect.TypeOf((*IOptionA)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "doSomething", GoMethod: "DoSomething"},
- },
- func() interface{} {
- return &jsiiProxy_IOptionA{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.anonymous.IOptionB",
- reflect.TypeOf((*IOptionB)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "doSomethingElse", GoMethod: "DoSomethingElse"},
- },
- func() interface{} {
- return &jsiiProxy_IOptionB{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.anonymous.UseOptions",
- reflect.TypeOf((*UseOptions)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_UseOptions{}
- },
- )
-}
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionA.go 1`] = `
-package anonymous
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AllowedMethodNames.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type IOptionA interface {
- DoSomething() *string
+type AllowedMethodNames interface {
+ GetBar(_p1 *string, _p2 *float64)
+ // getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay.
+ GetFoo(withParam *string) *string
+ SetBar(_x *string, _y *float64, _z *bool)
+ // setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay.
+ SetFoo(_x *string, _y *float64)
}
-// The jsii proxy for IOptionA
-type jsiiProxy_IOptionA struct {
+// The jsii proxy struct for AllowedMethodNames
+type jsiiProxy_AllowedMethodNames struct {
_ byte // padding
}
-func (i *jsiiProxy_IOptionA) DoSomething() *string {
- var returns *string
+func NewAllowedMethodNames() AllowedMethodNames {
+ _init_.Initialize()
- _jsii_.Invoke(
- i,
- "doSomething",
- nil, // no parameters
- &returns,
+ j := jsiiProxy_AllowedMethodNames{}
+
+ _jsii_.Create(
+ "jsii-calc.AllowedMethodNames",
+ nil, // no parameters
+ &j,
)
- return returns
+ return &j
}
+func NewAllowedMethodNames_Override(a AllowedMethodNames) {
+ _init_.Initialize()
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_IOptionB.go 1`] = `
-package anonymous
-
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-type IOptionB interface {
- DoSomethingElse() *string
+ _jsii_.Create(
+ "jsii-calc.AllowedMethodNames",
+ nil, // no parameters
+ a,
+ )
}
-// The jsii proxy for IOptionB
-type jsiiProxy_IOptionB struct {
- _ byte // padding
+func (a *jsiiProxy_AllowedMethodNames) GetBar(_p1 *string, _p2 *float64) {
+ _jsii_.InvokeVoid(
+ a,
+ "getBar",
+ []interface{}{_p1, _p2},
+ )
}
-func (i *jsiiProxy_IOptionB) DoSomethingElse() *string {
+func (a *jsiiProxy_AllowedMethodNames) GetFoo(withParam *string) *string {
var returns *string
_jsii_.Invoke(
- i,
- "doSomethingElse",
- nil, // no parameters
+ a,
+ "getFoo",
+ []interface{}{withParam},
&returns,
)
return returns
}
+func (a *jsiiProxy_AllowedMethodNames) SetBar(_x *string, _y *float64, _z *bool) {
+ _jsii_.InvokeVoid(
+ a,
+ "setBar",
+ []interface{}{_x, _y, _z},
+ )
+}
+
+func (a *jsiiProxy_AllowedMethodNames) SetFoo(_x *string, _y *float64) {
+ _jsii_.InvokeVoid(
+ a,
+ "setFoo",
+ []interface{}{_x, _y},
+ )
+}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/anonymous/anonymous_UseOptions.go 1`] = `
-package anonymous
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AmbiguousParameters.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type UseOptions interface {
+type AmbiguousParameters interface {
+ Props() *StructParameterType
+ Scope() Bell
}
-// The jsii proxy struct for UseOptions
-type jsiiProxy_UseOptions struct {
+// The jsii proxy struct for AmbiguousParameters
+type jsiiProxy_AmbiguousParameters struct {
_ byte // padding
}
-func UseOptions_Consume(option interface{}) *string {
- _init_.Initialize()
-
- var returns *string
-
- _jsii_.StaticInvoke(
- "jsii-calc.anonymous.UseOptions",
- "consume",
- []interface{}{option},
+func (j *jsiiProxy_AmbiguousParameters) Props() *StructParameterType {
+ var returns *StructParameterType
+ _jsii_.Get(
+ j,
+ "props",
&returns,
)
-
return returns
}
-func UseOptions_PrivideAsAny(which *string) interface{} {
- _init_.Initialize()
-
- var returns interface{}
-
- _jsii_.StaticInvoke(
- "jsii-calc.anonymous.UseOptions",
- "privideAsAny",
- []interface{}{which},
+func (j *jsiiProxy_AmbiguousParameters) Scope() Bell {
+ var returns Bell
+ _jsii_.Get(
+ j,
+ "scope",
&returns,
)
-
return returns
}
-func UseOptions_Provide(which *string) interface{} {
+
+func NewAmbiguousParameters(scope Bell, props *StructParameterType) AmbiguousParameters {
_init_.Initialize()
- var returns interface{}
+ j := jsiiProxy_AmbiguousParameters{}
- _jsii_.StaticInvoke(
- "jsii-calc.anonymous.UseOptions",
- "provide",
- []interface{}{which},
- &returns,
+ _jsii_.Create(
+ "jsii-calc.AmbiguousParameters",
+ []interface{}{scope, props},
+ &j,
)
- return returns
+ return &j
}
+func NewAmbiguousParameters_Override(a AmbiguousParameters, scope Bell, props *StructParameterType) {
+ _init_.Initialize()
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625.go 1`] = `
-package cdk16625
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.cdk16625.Cdk16625",
- reflect.TypeOf((*Cdk16625)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"},
- _jsii_.MemberMethod{JsiiMethod: "unwrap", GoMethod: "Unwrap"},
- },
- func() interface{} {
- return &jsiiProxy_Cdk16625{}
- },
+ _jsii_.Create(
+ "jsii-calc.AmbiguousParameters",
+ []interface{}{scope, props},
+ a,
)
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625_Cdk16625.go 1`] = `
-package cdk16625
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AnonymousImplementationProvider.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
-
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3"
)
-type Cdk16625 interface {
- // Run this function to verify that everything is working as it should.
- Test()
- // Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void).
- Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64
+type AnonymousImplementationProvider interface {
+ IAnonymousImplementationProvider
+ ProvideAsClass() Implementation
+ ProvideAsInterface() IAnonymouslyImplementMe
}
-// The jsii proxy struct for Cdk16625
-type jsiiProxy_Cdk16625 struct {
- _ byte // padding
+// The jsii proxy struct for AnonymousImplementationProvider
+type jsiiProxy_AnonymousImplementationProvider struct {
+ jsiiProxy_IAnonymousImplementationProvider
}
-func NewCdk16625_Override(c Cdk16625) {
+func NewAnonymousImplementationProvider() AnonymousImplementationProvider {
_init_.Initialize()
+ j := jsiiProxy_AnonymousImplementationProvider{}
+
_jsii_.Create(
- "jsii-calc.cdk16625.Cdk16625",
+ "jsii-calc.AnonymousImplementationProvider",
nil, // no parameters
- c,
+ &j,
)
+
+ return &j
}
-func (c *jsiiProxy_Cdk16625) Test() {
- _jsii_.InvokeVoid(
- c,
- "test",
+func NewAnonymousImplementationProvider_Override(a AnonymousImplementationProvider) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.AnonymousImplementationProvider",
nil, // no parameters
+ a,
)
}
-func (c *jsiiProxy_Cdk16625) Unwrap(gen jsiicalc.IRandomNumberGenerator) *float64 {
- var returns *float64
+func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsClass() Implementation {
+ var returns Implementation
_jsii_.Invoke(
- c,
- "unwrap",
- []interface{}{gen},
+ a,
+ "provideAsClass",
+ nil, // no parameters
&returns,
)
return returns
}
+func (a *jsiiProxy_AnonymousImplementationProvider) ProvideAsInterface() IAnonymouslyImplementMe {
+ var returns IAnonymouslyImplementMe
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport.go 1`] = `
-package donotimport
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType",
- reflect.TypeOf((*UnimportedSubmoduleType)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"},
- },
- func() interface{} {
- j := jsiiProxy_UnimportedSubmoduleType{}
- _jsii_.InitJsiiProxy(&j.Type__jsiicalcIRandomNumberGenerator)
- return &j
- },
+ _jsii_.Invoke(
+ a,
+ "provideAsInterface",
+ nil, // no parameters
+ &returns,
)
+
+ return returns
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/donotimport_UnimportedSubmoduleType.go 1`] = `
-package donotimport
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AsyncVirtualMethods.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
-
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3"
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/cdk16625/donotimport/internal"
)
-// This type demonstrates the ability to receive a callback argument that has a type from a submodule not explicitly imported in the user's code.
-//
-// This checks
-// that all types available in the assembly can be resolved by the runtime
-// library, regardless of whether they were explicitly referenced or not.
-// See: https://github.com/aws/aws-cdk/issues/16625
-//
-type UnimportedSubmoduleType interface {
- jsiicalc.IRandomNumberGenerator
- // Not quite random, but it'll do.
+type AsyncVirtualMethods interface {
+ CallMe() *float64
+ // Just calls "overrideMeToo".
+ CallMe2() *float64
+ // This method calls the "callMe" async method indirectly, which will then invoke a virtual method.
//
- // Returns: 1337.
- Next() *float64
+ // This is a "double promise" situation, which
+ // means that callbacks are not going to be available immediate, but only
+ // after an "immediates" cycle.
+ CallMeDoublePromise() *float64
+ DontOverrideMe() *float64
+ OverrideMe(mult *float64) *float64
+ OverrideMeToo() *float64
}
-// The jsii proxy struct for UnimportedSubmoduleType
-type jsiiProxy_UnimportedSubmoduleType struct {
- internal.Type__jsiicalcIRandomNumberGenerator
+// The jsii proxy struct for AsyncVirtualMethods
+type jsiiProxy_AsyncVirtualMethods struct {
+ _ byte // padding
}
-func NewUnimportedSubmoduleType(value *float64) UnimportedSubmoduleType {
+func NewAsyncVirtualMethods() AsyncVirtualMethods {
_init_.Initialize()
- j := jsiiProxy_UnimportedSubmoduleType{}
+ j := jsiiProxy_AsyncVirtualMethods{}
_jsii_.Create(
- "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType",
- []interface{}{value},
+ "jsii-calc.AsyncVirtualMethods",
+ nil, // no parameters
&j,
)
return &j
}
-func NewUnimportedSubmoduleType_Override(u UnimportedSubmoduleType, value *float64) {
+func NewAsyncVirtualMethods_Override(a AsyncVirtualMethods) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType",
- []interface{}{value},
- u,
+ "jsii-calc.AsyncVirtualMethods",
+ nil, // no parameters
+ a,
)
}
-func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 {
+func (a *jsiiProxy_AsyncVirtualMethods) CallMe() *float64 {
var returns *float64
_jsii_.Invoke(
- u,
- "next",
+ a,
+ "callMe",
nil, // no parameters
&returns,
)
@@ -3515,391 +4124,216 @@ func (u *jsiiProxy_UnimportedSubmoduleType) Next() *float64 {
return returns
}
+func (a *jsiiProxy_AsyncVirtualMethods) CallMe2() *float64 {
+ var returns *float64
-`;
+ _jsii_.Invoke(
+ a,
+ "callMe2",
+ nil, // no parameters
+ &returns,
+ )
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/donotimport/internal/types.go 1`] = `
-package internal
-import (
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3"
-)
-type Type__jsiicalcIRandomNumberGenerator = jsiicalc.IRandomNumberGenerator
+ return returns
+}
-`;
+func (a *jsiiProxy_AsyncVirtualMethods) CallMeDoublePromise() *float64 {
+ var returns *float64
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369.go 1`] = `
-package cdk22369
+ _jsii_.Invoke(
+ a,
+ "callMeDoublePromise",
+ nil, // no parameters
+ &returns,
+ )
-import (
- "reflect"
+ return returns
+}
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
+func (a *jsiiProxy_AsyncVirtualMethods) DontOverrideMe() *float64 {
+ var returns *float64
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.cdk22369.AcceptsPath",
- reflect.TypeOf((*AcceptsPath)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_AcceptsPath{}
- },
+ _jsii_.Invoke(
+ a,
+ "dontOverrideMe",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.cdk22369.AcceptsPathProps",
- reflect.TypeOf((*AcceptsPathProps)(nil)).Elem(),
+
+ return returns
+}
+
+func (a *jsiiProxy_AsyncVirtualMethods) OverrideMe(mult *float64) *float64 {
+ var returns *float64
+
+ _jsii_.Invoke(
+ a,
+ "overrideMe",
+ []interface{}{mult},
+ &returns,
+ )
+
+ return returns
+}
+
+func (a *jsiiProxy_AsyncVirtualMethods) OverrideMeToo() *float64 {
+ var returns *float64
+
+ _jsii_.Invoke(
+ a,
+ "overrideMeToo",
+ nil, // no parameters
+ &returns,
)
+
+ return returns
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPath.go 1`] = `
-package cdk22369
+exports[`Generated code for "jsii-calc": /go/jsiicalc/AugmentableClass.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type AcceptsPath interface {
+type AugmentableClass interface {
+ MethodOne()
+ MethodTwo()
}
-// The jsii proxy struct for AcceptsPath
-type jsiiProxy_AcceptsPath struct {
+// The jsii proxy struct for AugmentableClass
+type jsiiProxy_AugmentableClass struct {
_ byte // padding
}
-func NewAcceptsPath(props *AcceptsPathProps) AcceptsPath {
+func NewAugmentableClass() AugmentableClass {
_init_.Initialize()
- j := jsiiProxy_AcceptsPath{}
+ j := jsiiProxy_AugmentableClass{}
_jsii_.Create(
- "jsii-calc.cdk22369.AcceptsPath",
- []interface{}{props},
+ "jsii-calc.AugmentableClass",
+ nil, // no parameters
&j,
)
return &j
}
-func NewAcceptsPath_Override(a AcceptsPath, props *AcceptsPathProps) {
+func NewAugmentableClass_Override(a AugmentableClass) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.cdk22369.AcceptsPath",
- []interface{}{props},
+ "jsii-calc.AugmentableClass",
+ nil, // no parameters
a,
)
}
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk22369/cdk22369_AcceptsPathProps.go 1`] = `
-package cdk22369
-
-
-type AcceptsPathProps struct {
- // A path that doesn't exist.
- SourcePath *string \`field:"required" json:"sourcePath" yaml:"sourcePath"\`
+func (a *jsiiProxy_AugmentableClass) MethodOne() {
+ _jsii_.InvokeVoid(
+ a,
+ "methodOne",
+ nil, // no parameters
+ )
}
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition.go 1`] = `
-package composition
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.composition.CompositeOperation",
- reflect.TypeOf((*CompositeOperation)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"},
- _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"},
- _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"},
- _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_CompositeOperation{}
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation)
- return &j
- },
- )
- _jsii_.RegisterEnum(
- "jsii-calc.composition.CompositeOperation.CompositionStringStyle",
- reflect.TypeOf((*CompositeOperation_CompositionStringStyle)(nil)).Elem(),
- map[string]interface{}{
- "NORMAL": CompositeOperation_CompositionStringStyle_NORMAL,
- "DECORATED": CompositeOperation_CompositionStringStyle_DECORATED,
- },
+func (a *jsiiProxy_AugmentableClass) MethodTwo() {
+ _jsii_.InvokeVoid(
+ a,
+ "methodTwo",
+ nil, // no parameters
)
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation.go 1`] = `
-package composition
+exports[`Generated code for "jsii-calc": /go/jsiicalc/BaseClass.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
-
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition/internal"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
)
-// Abstract operation composed from an expression of other operations.
-type CompositeOperation interface {
- scopejsiicalclib.Operation
- // A set of postfixes to include in a decorated .toString().
- DecorationPostfixes() *[]*string
- SetDecorationPostfixes(val *[]*string)
- // A set of prefixes to include in a decorated .toString().
- DecorationPrefixes() *[]*string
- SetDecorationPrefixes(val *[]*string)
- // The expression that this operation consists of.
- //
- // Must be implemented by derived classes.
- Expression() scopejsiicalclib.NumericValue
- // The .toString() style.
- StringStyle() CompositeOperation_CompositionStringStyle
- SetStringStyle(val CompositeOperation_CompositionStringStyle)
- // The value.
- Value() *float64
- // String representation of the value.
- ToString() *string
- // Returns: the name of the class (to verify native type names are created for derived classes).
- TypeName() interface{}
+type BaseClass interface {
+ Property() *string
+ Method() *float64
}
-// The jsii proxy struct for CompositeOperation
-type jsiiProxy_CompositeOperation struct {
- internal.Type__scopejsiicalclibOperation
+// The jsii proxy struct for BaseClass
+type jsiiProxy_BaseClass struct {
+ _ byte // padding
}
-func (j *jsiiProxy_CompositeOperation) DecorationPostfixes() *[]*string {
- var returns *[]*string
+func (j *jsiiProxy_BaseClass) Property() *string {
+ var returns *string
_jsii_.Get(
j,
- "decorationPostfixes",
+ "property",
&returns,
)
return returns
}
-func (j *jsiiProxy_CompositeOperation) DecorationPrefixes() *[]*string {
- var returns *[]*string
- _jsii_.Get(
- j,
- "decorationPrefixes",
+
+func NewBaseClass_Override(b BaseClass) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.BaseClass",
+ nil, // no parameters
+ b,
+ )
+}
+
+func (b *jsiiProxy_BaseClass) Method() *float64 {
+ var returns *float64
+
+ _jsii_.Invoke(
+ b,
+ "method",
+ nil, // no parameters
&returns,
)
+
return returns
}
-func (j *jsiiProxy_CompositeOperation) Expression() scopejsiicalclib.NumericValue {
- var returns scopejsiicalclib.NumericValue
- _jsii_.Get(
- j,
- "expression",
- &returns,
- )
- return returns
-}
-
-func (j *jsiiProxy_CompositeOperation) StringStyle() CompositeOperation_CompositionStringStyle {
- var returns CompositeOperation_CompositionStringStyle
- _jsii_.Get(
- j,
- "stringStyle",
- &returns,
- )
- return returns
-}
-
-func (j *jsiiProxy_CompositeOperation) Value() *float64 {
- var returns *float64
- _jsii_.Get(
- j,
- "value",
- &returns,
- )
- return returns
-}
-
-
-func NewCompositeOperation_Override(c CompositeOperation) {
- _init_.Initialize()
-
- _jsii_.Create(
- "jsii-calc.composition.CompositeOperation",
- nil, // no parameters
- c,
- )
-}
-
-func (j *jsiiProxy_CompositeOperation)SetDecorationPostfixes(val *[]*string) {
- _jsii_.Set(
- j,
- "decorationPostfixes",
- val,
- )
-}
-
-func (j *jsiiProxy_CompositeOperation)SetDecorationPrefixes(val *[]*string) {
- _jsii_.Set(
- j,
- "decorationPrefixes",
- val,
- )
-}
-
-func (j *jsiiProxy_CompositeOperation)SetStringStyle(val CompositeOperation_CompositionStringStyle) {
- _jsii_.Set(
- j,
- "stringStyle",
- val,
- )
-}
-
-func (c *jsiiProxy_CompositeOperation) ToString() *string {
- var returns *string
-
- _jsii_.Invoke(
- c,
- "toString",
- nil, // no parameters
- &returns,
- )
-
- return returns
-}
-
-func (c *jsiiProxy_CompositeOperation) TypeName() interface{} {
- var returns interface{}
-
- _jsii_.Invoke(
- c,
- "typeName",
- nil, // no parameters
- &returns,
- )
-
- return returns
-}
-
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/composition_CompositeOperation_CompositionStringStyle.go 1`] = `
-package composition
-
-
-// Style of .toString() output for CompositeOperation.
-type CompositeOperation_CompositionStringStyle string
-
-const (
- // Normal string expression.
- CompositeOperation_CompositionStringStyle_NORMAL CompositeOperation_CompositionStringStyle = "NORMAL"
- // Decorated string expression.
- CompositeOperation_CompositionStringStyle_DECORATED CompositeOperation_CompositionStringStyle = "DECORATED"
-)
-
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/composition/internal/types.go 1`] = `
-package internal
-import (
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
-)
-type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties.go 1`] = `
-package derivedclasshasnoproperties
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.DerivedClassHasNoProperties.Base",
- reflect.TypeOf((*Base)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"},
- },
- func() interface{} {
- return &jsiiProxy_Base{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.DerivedClassHasNoProperties.Derived",
- reflect.TypeOf((*Derived)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"},
- },
- func() interface{} {
- j := jsiiProxy_Derived{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_Base)
- return &j
- },
- )
-}
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Base.go 1`] = `
-package derivedclasshasnoproperties
+exports[`Generated code for "jsii-calc": /go/jsiicalc/BaseJsii976.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type Base interface {
- Prop() *string
- SetProp(val *string)
+type BaseJsii976 interface {
}
-// The jsii proxy struct for Base
-type jsiiProxy_Base struct {
+// The jsii proxy struct for BaseJsii976
+type jsiiProxy_BaseJsii976 struct {
_ byte // padding
}
-func (j *jsiiProxy_Base) Prop() *string {
- var returns *string
- _jsii_.Get(
- j,
- "prop",
- &returns,
- )
- return returns
-}
-
-
-func NewBase() Base {
+func NewBaseJsii976() BaseJsii976 {
_init_.Initialize()
- j := jsiiProxy_Base{}
+ j := jsiiProxy_BaseJsii976{}
_jsii_.Create(
- "jsii-calc.DerivedClassHasNoProperties.Base",
+ "jsii-calc.BaseJsii976",
nil, // no parameters
&j,
)
@@ -3907,64 +4341,58 @@ func NewBase() Base {
return &j
}
-func NewBase_Override(b Base) {
+func NewBaseJsii976_Override(b BaseJsii976) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.DerivedClassHasNoProperties.Base",
+ "jsii-calc.BaseJsii976",
nil, // no parameters
b,
)
}
-func (j *jsiiProxy_Base)SetProp(val *string) {
- _jsii_.Set(
- j,
- "prop",
- val,
- )
-}
-
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/derivedclasshasnoproperties/derivedclasshasnoproperties_Derived.go 1`] = `
-package derivedclasshasnoproperties
+exports[`Generated code for "jsii-calc": /go/jsiicalc/Bell.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type Derived interface {
- Base
- Prop() *string
- SetProp(val *string)
+type Bell interface {
+ IBell
+ Rung() *bool
+ SetRung(val *bool)
+ Ring()
}
-// The jsii proxy struct for Derived
-type jsiiProxy_Derived struct {
- jsiiProxy_Base
+// The jsii proxy struct for Bell
+type jsiiProxy_Bell struct {
+ jsiiProxy_IBell
}
-func (j *jsiiProxy_Derived) Prop() *string {
- var returns *string
+func (j *jsiiProxy_Bell) Rung() *bool {
+ var returns *bool
_jsii_.Get(
j,
- "prop",
+ "rung",
&returns,
)
return returns
}
-func NewDerived() Derived {
+func NewBell() Bell {
_init_.Initialize()
- j := jsiiProxy_Derived{}
+ j := jsiiProxy_Bell{}
_jsii_.Create(
- "jsii-calc.DerivedClassHasNoProperties.Derived",
+ "jsii-calc.Bell",
nil, // no parameters
&j,
)
@@ -3972,2871 +4400,2945 @@ func NewDerived() Derived {
return &j
}
-func NewDerived_Override(d Derived) {
+func NewBell_Override(b Bell) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.DerivedClassHasNoProperties.Derived",
+ "jsii-calc.Bell",
nil, // no parameters
- d,
+ b,
)
}
-func (j *jsiiProxy_Derived)SetProp(val *string) {
+func (j *jsiiProxy_Bell)SetRung(val *bool) {
_jsii_.Set(
j,
- "prop",
+ "rung",
val,
)
}
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/go.mod 1`] = `
-module github.com/aws/jsii/jsii-calc/go/jsiicalc/v3
-
-go 1.18
-
-require (
- github.com/aws/jsii-runtime-go v0.0.0
- github.com/aws/jsii/jsii-calc/go/jcb v0.0.0
- github.com/aws/jsii/jsii-calc/go/scopejsiicalclib v0.0.0-devpreview
- github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 // indirect
-)
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/README.md 1`] = `
-Verifies homonymous forward references don't trip the Python type checker
-
-This has been an issue when stub functions were introduced to create a reliable source for type checking
-information, which was reported in https://github.com/aws/jsii/issues/3818.
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar.go 1`] = `
-package bar
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.homonymousForwardReferences.bar.Consumer",
- reflect.TypeOf((*Consumer)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Consumer{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.homonymousForwardReferences.bar.ConsumerProps",
- reflect.TypeOf((*ConsumerProps)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.homonymousForwardReferences.bar.Homonymous",
- reflect.TypeOf((*Homonymous)(nil)).Elem(),
+func (b *jsiiProxy_Bell) Ring() {
+ _jsii_.InvokeVoid(
+ b,
+ "ring",
+ nil, // no parameters
)
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Consumer.go 1`] = `
-package bar
+exports[`Generated code for "jsii-calc": /go/jsiicalc/BinaryOperation.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+
+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
)
-type Consumer interface {
+// Represents an operation with two operands.
+type BinaryOperation interface {
+ scopejsiicalclib.Operation
+ scopejsiicalclib.IFriendly
+ // Left-hand side operand.
+ Lhs() scopejsiicalclib.NumericValue
+ // Right-hand side operand.
+ Rhs() scopejsiicalclib.NumericValue
+ // The value.
+ // Deprecated.
+ Value() *float64
+ // Say hello!
+ Hello() *string
+ // String representation of the value.
+ // Deprecated.
+ ToString() *string
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ TypeName() interface{}
}
-// The jsii proxy struct for Consumer
-type jsiiProxy_Consumer struct {
- _ byte // padding
+// The jsii proxy struct for BinaryOperation
+type jsiiProxy_BinaryOperation struct {
+ internal.Type__scopejsiicalclibOperation
+ internal.Type__scopejsiicalclibIFriendly
}
-func Consumer_Consume(props *ConsumerProps) *Homonymous {
- _init_.Initialize()
-
- var returns *Homonymous
-
- _jsii_.StaticInvoke(
- "jsii-calc.homonymousForwardReferences.bar.Consumer",
- "consume",
- []interface{}{props},
+func (j *jsiiProxy_BinaryOperation) Lhs() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "lhs",
&returns,
)
-
return returns
}
+func (j *jsiiProxy_BinaryOperation) Rhs() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "rhs",
+ &returns,
+ )
+ return returns
+}
-`;
+func (j *jsiiProxy_BinaryOperation) Value() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "value",
+ &returns,
+ )
+ return returns
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_ConsumerProps.go 1`] = `
-package bar
+// Creates a BinaryOperation.
+func NewBinaryOperation_Override(b BinaryOperation, lhs scopejsiicalclib.NumericValue, rhs scopejsiicalclib.NumericValue) {
+ _init_.Initialize()
-type ConsumerProps struct {
- Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\`
+ _jsii_.Create(
+ "jsii-calc.BinaryOperation",
+ []interface{}{lhs, rhs},
+ b,
+ )
}
+func (b *jsiiProxy_BinaryOperation) Hello() *string {
+ var returns *string
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/bar/bar_Homonymous.go 1`] = `
-package bar
-
+ _jsii_.Invoke(
+ b,
+ "hello",
+ nil, // no parameters
+ &returns,
+ )
-type Homonymous struct {
- NumericProperty *float64 \`field:"required" json:"numericProperty" yaml:"numericProperty"\`
+ return returns
}
+func (b *jsiiProxy_BinaryOperation) ToString() *string {
+ var returns *string
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo.go 1`] = `
-package foo
+ _jsii_.Invoke(
+ b,
+ "toString",
+ nil, // no parameters
+ &returns,
+ )
-import (
- "reflect"
+ return returns
+}
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
+func (b *jsiiProxy_BinaryOperation) TypeName() interface{} {
+ var returns interface{}
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.homonymousForwardReferences.foo.Consumer",
- reflect.TypeOf((*Consumer)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Consumer{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.homonymousForwardReferences.foo.ConsumerProps",
- reflect.TypeOf((*ConsumerProps)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.homonymousForwardReferences.foo.Homonymous",
- reflect.TypeOf((*Homonymous)(nil)).Elem(),
+ _jsii_.Invoke(
+ b,
+ "typeName",
+ nil, // no parameters
+ &returns,
)
+
+ return returns
}
+
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Consumer.go 1`] = `
-package foo
+exports[`Generated code for "jsii-calc": /go/jsiicalc/BurriedAnonymousObject.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-type Consumer interface {
+// See https://github.com/aws/aws-cdk/issues/7977.
+type BurriedAnonymousObject interface {
+ Check() *bool
+ // Implement this method and have it return it's parameter.
+ //
+ // Returns: \`value\`.
+ GiveItBack(value interface{}) interface{}
}
-// The jsii proxy struct for Consumer
-type jsiiProxy_Consumer struct {
+// The jsii proxy struct for BurriedAnonymousObject
+type jsiiProxy_BurriedAnonymousObject struct {
_ byte // padding
}
-func Consumer_Consume(props *ConsumerProps) *Homonymous {
+func NewBurriedAnonymousObject_Override(b BurriedAnonymousObject) {
_init_.Initialize()
- var returns *Homonymous
-
- _jsii_.StaticInvoke(
- "jsii-calc.homonymousForwardReferences.foo.Consumer",
- "consume",
- []interface{}{props},
- &returns,
+ _jsii_.Create(
+ "jsii-calc.BurriedAnonymousObject",
+ nil, // no parameters
+ b,
)
-
- return returns
}
+func (b *jsiiProxy_BurriedAnonymousObject) Check() *bool {
+ var returns *bool
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_ConsumerProps.go 1`] = `
-package foo
-
+ _jsii_.Invoke(
+ b,
+ "check",
+ nil, // no parameters
+ &returns,
+ )
-type ConsumerProps struct {
- Homonymous *Homonymous \`field:"required" json:"homonymous" yaml:"homonymous"\`
+ return returns
}
+func (b *jsiiProxy_BurriedAnonymousObject) GiveItBack(value interface{}) interface{} {
+ var returns interface{}
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/homonymousforwardreferences/foo/foo_Homonymous.go 1`] = `
-package foo
-
+ _jsii_.Invoke(
+ b,
+ "giveItBack",
+ []interface{}{value},
+ &returns,
+ )
-type Homonymous struct {
- StringProperty *string \`field:"required" json:"stringProperty" yaml:"stringProperty"\`
+ return returns
}
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses.go 1`] = `
-package interfaceinnamespaceincludesclasses
-
-import (
- "reflect"
-
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
-
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo",
- reflect.TypeOf((*Foo)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "bar", GoGetter: "Bar"},
- },
- func() interface{} {
- return &jsiiProxy_Foo{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello",
- reflect.TypeOf((*Hello)(nil)).Elem(),
- )
-}
-
-`;
-
-exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Foo.go 1`] = `
-package interfaceinnamespaceincludesclasses
+exports[`Generated code for "jsii-calc": /go/jsiicalc/Calculator.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
-)
-type Foo interface {
- Bar() *string
- SetBar(val *string)
+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition"
+ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/internal"
+ "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
+)
+
+// A calculator which maintains a current value and allows adding operations.
+//
+// Here's how you use it:
+//
+// \`\`\`ts
+// const calculator = new calc.Calculator();
+// calculator.add(5);
+// calculator.mul(3);
+// console.log(calculator.expression.value);
+// \`\`\`
+//
+// I will repeat this example again, but in an @example tag.
+//
+// Example:
+// calculator := calc.NewCalculator()
+// calculator.Add(jsii.Number(5))
+// calculator.Mul(jsii.Number(3))
+// fmt.Println(calculator.expression.Value)
+//
+type Calculator interface {
+ composition.CompositeOperation
+ // The current value.
+ Curr() scopejsiicalclib.NumericValue
+ SetCurr(val scopejsiicalclib.NumericValue)
+ // A set of postfixes to include in a decorated .toString().
+ DecorationPostfixes() *[]*string
+ SetDecorationPostfixes(val *[]*string)
+ // A set of prefixes to include in a decorated .toString().
+ DecorationPrefixes() *[]*string
+ SetDecorationPrefixes(val *[]*string)
+ // Returns the expression.
+ Expression() scopejsiicalclib.NumericValue
+ // The maximum value allows in this calculator.
+ MaxValue() *float64
+ SetMaxValue(val *float64)
+ // A log of all operations.
+ OperationsLog() *[]scopejsiicalclib.NumericValue
+ // A map of per operation name of all operations performed.
+ OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue
+ // The .toString() style.
+ StringStyle() composition.CompositeOperation_CompositionStringStyle
+ SetStringStyle(val composition.CompositeOperation_CompositionStringStyle)
+ // Example of a property that accepts a union of types.
+ UnionProperty() interface{}
+ SetUnionProperty(val interface{})
+ // The value.
+ Value() *float64
+ // Adds a number to the current value.
+ Add(value *float64)
+ // Multiplies the current value by a number.
+ Mul(value *float64)
+ // Negates the current value.
+ Neg()
+ // Raises the current value by a power.
+ Pow(value *float64)
+ // Returns teh value of the union property (if defined).
+ ReadUnionValue() *float64
+ // String representation of the value.
+ ToString() *string
+ // Returns: the name of the class (to verify native type names are created for derived classes).
+ TypeName() interface{}
}
-// The jsii proxy struct for Foo
-type jsiiProxy_Foo struct {
- _ byte // padding
+// The jsii proxy struct for Calculator
+type jsiiProxy_Calculator struct {
+ internal.Type__compositionCompositeOperation
}
-func (j *jsiiProxy_Foo) Bar() *string {
- var returns *string
+func (j *jsiiProxy_Calculator) Curr() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
_jsii_.Get(
j,
- "bar",
+ "curr",
&returns,
)
return returns
}
+func (j *jsiiProxy_Calculator) DecorationPostfixes() *[]*string {
+ var returns *[]*string
+ _jsii_.Get(
+ j,
+ "decorationPostfixes",
+ &returns,
+ )
+ return returns
+}
-func NewFoo() Foo {
+func (j *jsiiProxy_Calculator) DecorationPrefixes() *[]*string {
+ var returns *[]*string
+ _jsii_.Get(
+ j,
+ "decorationPrefixes",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) Expression() scopejsiicalclib.NumericValue {
+ var returns scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "expression",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) MaxValue() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "maxValue",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) OperationsLog() *[]scopejsiicalclib.NumericValue {
+ var returns *[]scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "operationsLog",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) OperationsMap() *map[string]*[]scopejsiicalclib.NumericValue {
+ var returns *map[string]*[]scopejsiicalclib.NumericValue
+ _jsii_.Get(
+ j,
+ "operationsMap",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) StringStyle() composition.CompositeOperation_CompositionStringStyle {
+ var returns composition.CompositeOperation_CompositionStringStyle
+ _jsii_.Get(
+ j,
+ "stringStyle",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) UnionProperty() interface{} {
+ var returns interface{}
+ _jsii_.Get(
+ j,
+ "unionProperty",
+ &returns,
+ )
+ return returns
+}
+
+func (j *jsiiProxy_Calculator) Value() *float64 {
+ var returns *float64
+ _jsii_.Get(
+ j,
+ "value",
+ &returns,
+ )
+ return returns
+}
+
+
+// Creates a Calculator object.
+func NewCalculator(props *CalculatorProps) Calculator {
_init_.Initialize()
- j := jsiiProxy_Foo{}
+ j := jsiiProxy_Calculator{}
_jsii_.Create(
- "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo",
- nil, // no parameters
+ "jsii-calc.Calculator",
+ []interface{}{props},
&j,
)
return &j
}
-func NewFoo_Override(f Foo) {
+// Creates a Calculator object.
+func NewCalculator_Override(c Calculator, props *CalculatorProps) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo",
- nil, // no parameters
- f,
+ "jsii-calc.Calculator",
+ []interface{}{props},
+ c,
)
}
-func (j *jsiiProxy_Foo)SetBar(val *string) {
+func (j *jsiiProxy_Calculator)SetCurr(val scopejsiicalclib.NumericValue) {
_jsii_.Set(
j,
- "bar",
+ "curr",
val,
)
}
+func (j *jsiiProxy_Calculator)SetDecorationPostfixes(val *[]*string) {
+ _jsii_.Set(
+ j,
+ "decorationPostfixes",
+ val,
+ )
+}
-`;
+func (j *jsiiProxy_Calculator)SetDecorationPrefixes(val *[]*string) {
+ _jsii_.Set(
+ j,
+ "decorationPrefixes",
+ val,
+ )
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceincludesclasses/interfaceinnamespaceincludesclasses_Hello.go 1`] = `
-package interfaceinnamespaceincludesclasses
+func (j *jsiiProxy_Calculator)SetMaxValue(val *float64) {
+ _jsii_.Set(
+ j,
+ "maxValue",
+ val,
+ )
+}
+func (j *jsiiProxy_Calculator)SetStringStyle(val composition.CompositeOperation_CompositionStringStyle) {
+ _jsii_.Set(
+ j,
+ "stringStyle",
+ val,
+ )
+}
-type Hello struct {
- Foo *float64 \`field:"required" json:"foo" yaml:"foo"\`
+func (j *jsiiProxy_Calculator)SetUnionProperty(val interface{}) {
+ _jsii_.Set(
+ j,
+ "unionProperty",
+ val,
+ )
}
+func (c *jsiiProxy_Calculator) Add(value *float64) {
+ _jsii_.InvokeVoid(
+ c,
+ "add",
+ []interface{}{value},
+ )
+}
-`;
+func (c *jsiiProxy_Calculator) Mul(value *float64) {
+ _jsii_.InvokeVoid(
+ c,
+ "mul",
+ []interface{}{value},
+ )
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface.go 1`] = `
-package interfaceinnamespaceonlyinterface
+func (c *jsiiProxy_Calculator) Neg() {
+ _jsii_.InvokeVoid(
+ c,
+ "neg",
+ nil, // no parameters
+ )
+}
-import (
- "reflect"
+func (c *jsiiProxy_Calculator) Pow(value *float64) {
+ _jsii_.InvokeVoid(
+ c,
+ "pow",
+ []interface{}{value},
+ )
+}
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
-)
+func (c *jsiiProxy_Calculator) ReadUnionValue() *float64 {
+ var returns *float64
-func init() {
- _jsii_.RegisterStruct(
- "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello",
- reflect.TypeOf((*Hello)(nil)).Elem(),
+ _jsii_.Invoke(
+ c,
+ "readUnionValue",
+ nil, // no parameters
+ &returns,
)
-}
-`;
+ return returns
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/interfaceinnamespaceonlyinterface/interfaceinnamespaceonlyinterface_Hello.go 1`] = `
-package interfaceinnamespaceonlyinterface
+func (c *jsiiProxy_Calculator) ToString() *string {
+ var returns *string
+ _jsii_.Invoke(
+ c,
+ "toString",
+ nil, // no parameters
+ &returns,
+ )
-type Hello struct {
- Foo *float64 \`field:"required" json:"foo" yaml:"foo"\`
+ return returns
}
+func (c *jsiiProxy_Calculator) TypeName() interface{} {
+ var returns interface{}
-`;
+ _jsii_.Invoke(
+ c,
+ "typeName",
+ nil, // no parameters
+ &returns,
+ )
+
+ return returns
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/internal/types.go 1`] = `
-package internal
-import (
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib"
- "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/composition"
- "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/customsubmodulename"
-)
-type Type__scopejsiicalclibOperation = scopejsiicalclib.Operation
-type Type__scopejsiicalclibIFriendly = scopejsiicalclib.IFriendly
-type Type__compositionCompositeOperation = composition.CompositeOperation
-type Type__customsubmodulenameIReflectable = customsubmodulename.IReflectable
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii.go 1`] = `
-// Package jsii contains the functionaility needed for jsii packages to
-// initialize their dependencies and themselves. Users should never need to use this package
-// directly. If you find you need to - please report a bug at
-// https://github.com/aws/jsii/issues/new/choose
-package jsii
+exports[`Generated code for "jsii-calc": /go/jsiicalc/CalculatorProps.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
-import (
- _ "embed"
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+// Properties for Calculator.
+type CalculatorProps struct {
+ // The initial value of the calculator.
+ //
+ // NOTE: Any number works here, it's fine.
+ InitialValue *float64 \`field:"optional" json:"initialValue" yaml:"initialValue"\`
+ // The maximum value the calculator can store.
+ MaximumValue *float64 \`field:"optional" json:"maximumValue" yaml:"maximumValue"\`
+}
- jcb "github.com/aws/jsii/jsii-calc/go/jcb/jsii"
- scopejsiicalclib "github.com/aws/jsii/jsii-calc/go/scopejsiicalclib/jsii"
-)
-//go:embed jsii-calc-3.20.120.tgz
-var tarball []byte
+`;
-// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module.
-// The implementation is idempotent (and hence safe to be called over and over).
-func Initialize() {
- // Ensure all dependencies are initialized
- jcb.Initialize()
- scopejsiicalclib.Initialize()
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ChildStruct982.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
- // Load this library into the kernel
- _jsii_.Load("jsii-calc", "3.20.120", tarball)
+
+type ChildStruct982 struct {
+ Foo *string \`field:"required" json:"foo" yaml:"foo"\`
+ Bar *float64 \`field:"required" json:"bar" yaml:"bar"\`
}
-`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii/jsii-calc-3.20.120.tgz 1`] = `go/jsiicalc/jsii/jsii-calc-3.20.120.tgz is a tarball`;
+`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656.go 1`] = `
-package jsii3656
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsTheInternalInterface.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
import (
- "reflect"
-
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-func init() {
- _jsii_.RegisterStruct(
- "jsii-calc.jsii3656.ImplementMeOpts",
- reflect.TypeOf((*ImplementMeOpts)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.jsii3656.OverrideMe",
- reflect.TypeOf((*OverrideMe)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "implementMe", GoMethod: "ImplementMe"},
- },
- func() interface{} {
- return &jsiiProxy_OverrideMe{}
- },
- )
+type ClassThatImplementsTheInternalInterface interface {
+ INonInternalInterface
+ A() *string
+ SetA(val *string)
+ B() *string
+ SetB(val *string)
+ C() *string
+ SetC(val *string)
+ D() *string
+ SetD(val *string)
}
-`;
+// The jsii proxy struct for ClassThatImplementsTheInternalInterface
+type jsiiProxy_ClassThatImplementsTheInternalInterface struct {
+ jsiiProxy_INonInternalInterface
+}
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_ImplementMeOpts.go 1`] = `
-package jsii3656
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) A() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "a",
+ &returns,
+ )
+ return returns
+}
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) B() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "b",
+ &returns,
+ )
+ return returns
+}
-type ImplementMeOpts struct {
- Name *string \`field:"required" json:"name" yaml:"name"\`
- Count *float64 \`field:"optional" json:"count" yaml:"count"\`
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) C() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "c",
+ &returns,
+ )
+ return returns
}
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface) D() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "d",
+ &returns,
+ )
+ return returns
+}
-`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsii3656/jsii3656_OverrideMe.go 1`] = `
-package jsii3656
+func NewClassThatImplementsTheInternalInterface() ClassThatImplementsTheInternalInterface {
+ _init_.Initialize()
-import (
- _jsii_ "github.com/aws/jsii-runtime-go/runtime"
- _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
-)
+ j := jsiiProxy_ClassThatImplementsTheInternalInterface{}
-type OverrideMe interface {
- ImplementMe(opts *ImplementMeOpts) *bool
-}
+ _jsii_.Create(
+ "jsii-calc.ClassThatImplementsTheInternalInterface",
+ nil, // no parameters
+ &j,
+ )
-// The jsii proxy struct for OverrideMe
-type jsiiProxy_OverrideMe struct {
- _ byte // padding
+ return &j
}
-func NewOverrideMe_Override(o OverrideMe) {
+func NewClassThatImplementsTheInternalInterface_Override(c ClassThatImplementsTheInternalInterface) {
_init_.Initialize()
_jsii_.Create(
- "jsii-calc.jsii3656.OverrideMe",
+ "jsii-calc.ClassThatImplementsTheInternalInterface",
nil, // no parameters
- o,
+ c,
)
}
-func OverrideMe_CallAbstract(receiver OverrideMe) *bool {
- _init_.Initialize()
-
- var returns *bool
-
- _jsii_.StaticInvoke(
- "jsii-calc.jsii3656.OverrideMe",
- "callAbstract",
- []interface{}{receiver},
- &returns,
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetA(val *string) {
+ _jsii_.Set(
+ j,
+ "a",
+ val,
)
-
- return returns
}
-func (o *jsiiProxy_OverrideMe) ImplementMe(opts *ImplementMeOpts) *bool {
- var returns *bool
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetB(val *string) {
+ _jsii_.Set(
+ j,
+ "b",
+ val,
+ )
+}
- _jsii_.Invoke(
- o,
- "implementMe",
- []interface{}{opts},
- &returns,
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetC(val *string) {
+ _jsii_.Set(
+ j,
+ "c",
+ val,
)
+}
- return returns
+func (j *jsiiProxy_ClassThatImplementsTheInternalInterface)SetD(val *string) {
+ _jsii_.Set(
+ j,
+ "d",
+ val,
+ )
}
`;
-exports[`Generated code for "jsii-calc": /go/jsiicalc/jsiicalc.go 1`] = `
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassThatImplementsThePrivateInterface.go 1`] = `
+// A simple calcuator built on JSII.
package jsiicalc
import (
- "reflect"
-
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
)
-func init() {
- _jsii_.RegisterClass(
- "jsii-calc.AbstractClass",
- reflect.TypeOf((*AbstractClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "abstractMethod", GoMethod: "AbstractMethod"},
- _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"},
- _jsii_.MemberMethod{JsiiMethod: "nonAbstractMethod", GoMethod: "NonAbstractMethod"},
- _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"},
- },
- func() interface{} {
- j := jsiiProxy_AbstractClass{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_AbstractClassBase)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceImplementedByAbstractClass)
- return &j
- },
+type ClassThatImplementsThePrivateInterface interface {
+ INonInternalInterface
+ A() *string
+ SetA(val *string)
+ B() *string
+ SetB(val *string)
+ C() *string
+ SetC(val *string)
+ E() *string
+ SetE(val *string)
+}
+
+// The jsii proxy struct for ClassThatImplementsThePrivateInterface
+type jsiiProxy_ClassThatImplementsThePrivateInterface struct {
+ jsiiProxy_INonInternalInterface
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) A() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "a",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.AbstractClassBase",
- reflect.TypeOf((*AbstractClassBase)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "abstractProperty", GoGetter: "AbstractProperty"},
- },
- func() interface{} {
- return &jsiiProxy_AbstractClassBase{}
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) B() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "b",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.AbstractClassReturner",
- reflect.TypeOf((*AbstractClassReturner)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "giveMeAbstract", GoMethod: "GiveMeAbstract"},
- _jsii_.MemberMethod{JsiiMethod: "giveMeInterface", GoMethod: "GiveMeInterface"},
- _jsii_.MemberProperty{JsiiProperty: "returnAbstractFromProperty", GoGetter: "ReturnAbstractFromProperty"},
- },
- func() interface{} {
- return &jsiiProxy_AbstractClassReturner{}
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) C() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "c",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.AbstractSuite",
- reflect.TypeOf((*AbstractSuite)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- _jsii_.MemberMethod{JsiiMethod: "someMethod", GoMethod: "SomeMethod"},
- _jsii_.MemberMethod{JsiiMethod: "workItAll", GoMethod: "WorkItAll"},
- },
- func() interface{} {
- return &jsiiProxy_AbstractSuite{}
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface) E() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "e",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.Add",
- reflect.TypeOf((*Add)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"},
- _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_Add{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation)
- return &j
- },
+ return returns
+}
+
+
+func NewClassThatImplementsThePrivateInterface() ClassThatImplementsThePrivateInterface {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassThatImplementsThePrivateInterface{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassThatImplementsThePrivateInterface",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.AllTypes",
- reflect.TypeOf((*AllTypes)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "anyArrayProperty", GoGetter: "AnyArrayProperty"},
- _jsii_.MemberMethod{JsiiMethod: "anyIn", GoMethod: "AnyIn"},
- _jsii_.MemberProperty{JsiiProperty: "anyMapProperty", GoGetter: "AnyMapProperty"},
- _jsii_.MemberMethod{JsiiMethod: "anyOut", GoMethod: "AnyOut"},
- _jsii_.MemberProperty{JsiiProperty: "anyProperty", GoGetter: "AnyProperty"},
- _jsii_.MemberProperty{JsiiProperty: "arrayProperty", GoGetter: "ArrayProperty"},
- _jsii_.MemberProperty{JsiiProperty: "booleanProperty", GoGetter: "BooleanProperty"},
- _jsii_.MemberProperty{JsiiProperty: "dateProperty", GoGetter: "DateProperty"},
- _jsii_.MemberMethod{JsiiMethod: "enumMethod", GoMethod: "EnumMethod"},
- _jsii_.MemberProperty{JsiiProperty: "enumProperty", GoGetter: "EnumProperty"},
- _jsii_.MemberProperty{JsiiProperty: "enumPropertyValue", GoGetter: "EnumPropertyValue"},
- _jsii_.MemberProperty{JsiiProperty: "jsonProperty", GoGetter: "JsonProperty"},
- _jsii_.MemberProperty{JsiiProperty: "mapProperty", GoGetter: "MapProperty"},
- _jsii_.MemberProperty{JsiiProperty: "numberProperty", GoGetter: "NumberProperty"},
- _jsii_.MemberProperty{JsiiProperty: "optionalEnumValue", GoGetter: "OptionalEnumValue"},
- _jsii_.MemberProperty{JsiiProperty: "stringProperty", GoGetter: "StringProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unionArrayProperty", GoGetter: "UnionArrayProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unionMapProperty", GoGetter: "UnionMapProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unknownArrayProperty", GoGetter: "UnknownArrayProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unknownMapProperty", GoGetter: "UnknownMapProperty"},
- _jsii_.MemberProperty{JsiiProperty: "unknownProperty", GoGetter: "UnknownProperty"},
- },
- func() interface{} {
- return &jsiiProxy_AllTypes{}
- },
+
+ return &j
+}
+
+func NewClassThatImplementsThePrivateInterface_Override(c ClassThatImplementsThePrivateInterface) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassThatImplementsThePrivateInterface",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterEnum(
- "jsii-calc.AllTypesEnum",
- reflect.TypeOf((*AllTypesEnum)(nil)).Elem(),
- map[string]interface{}{
- "MY_ENUM_VALUE": AllTypesEnum_MY_ENUM_VALUE,
- "YOUR_ENUM_VALUE": AllTypesEnum_YOUR_ENUM_VALUE,
- "THIS_IS_GREAT": AllTypesEnum_THIS_IS_GREAT,
- },
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetA(val *string) {
+ _jsii_.Set(
+ j,
+ "a",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.AllowedMethodNames",
- reflect.TypeOf((*AllowedMethodNames)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "getBar", GoMethod: "GetBar"},
- _jsii_.MemberMethod{JsiiMethod: "getFoo", GoMethod: "GetFoo"},
- _jsii_.MemberMethod{JsiiMethod: "setBar", GoMethod: "SetBar"},
- _jsii_.MemberMethod{JsiiMethod: "setFoo", GoMethod: "SetFoo"},
- },
- func() interface{} {
- return &jsiiProxy_AllowedMethodNames{}
- },
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetB(val *string) {
+ _jsii_.Set(
+ j,
+ "b",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.AmbiguousParameters",
- reflect.TypeOf((*AmbiguousParameters)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"},
- _jsii_.MemberProperty{JsiiProperty: "scope", GoGetter: "Scope"},
- },
- func() interface{} {
- return &jsiiProxy_AmbiguousParameters{}
- },
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetC(val *string) {
+ _jsii_.Set(
+ j,
+ "c",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.AnonymousImplementationProvider",
- reflect.TypeOf((*AnonymousImplementationProvider)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"},
- _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"},
- },
- func() interface{} {
- j := jsiiProxy_AnonymousImplementationProvider{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnonymousImplementationProvider)
- return &j
- },
+}
+
+func (j *jsiiProxy_ClassThatImplementsThePrivateInterface)SetE(val *string) {
+ _jsii_.Set(
+ j,
+ "e",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.AsyncVirtualMethods",
- reflect.TypeOf((*AsyncVirtualMethods)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "callMe", GoMethod: "CallMe"},
- _jsii_.MemberMethod{JsiiMethod: "callMe2", GoMethod: "CallMe2"},
- _jsii_.MemberMethod{JsiiMethod: "callMeDoublePromise", GoMethod: "CallMeDoublePromise"},
- _jsii_.MemberMethod{JsiiMethod: "dontOverrideMe", GoMethod: "DontOverrideMe"},
- _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"},
- _jsii_.MemberMethod{JsiiMethod: "overrideMeToo", GoMethod: "OverrideMeToo"},
- },
- func() interface{} {
- return &jsiiProxy_AsyncVirtualMethods{}
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollectionOfUnions.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithCollectionOfUnions interface {
+ UnionProperty() *[]*map[string]interface{}
+ SetUnionProperty(val *[]*map[string]interface{})
+}
+
+// The jsii proxy struct for ClassWithCollectionOfUnions
+type jsiiProxy_ClassWithCollectionOfUnions struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithCollectionOfUnions) UnionProperty() *[]*map[string]interface{} {
+ var returns *[]*map[string]interface{}
+ _jsii_.Get(
+ j,
+ "unionProperty",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.AugmentableClass",
- reflect.TypeOf((*AugmentableClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "methodOne", GoMethod: "MethodOne"},
- _jsii_.MemberMethod{JsiiMethod: "methodTwo", GoMethod: "MethodTwo"},
- },
- func() interface{} {
- return &jsiiProxy_AugmentableClass{}
- },
+ return returns
+}
+
+
+func NewClassWithCollectionOfUnions(unionProperty *[]*map[string]interface{}) ClassWithCollectionOfUnions {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithCollectionOfUnions{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithCollectionOfUnions",
+ []interface{}{unionProperty},
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.BaseClass",
- reflect.TypeOf((*BaseClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- return &jsiiProxy_BaseClass{}
- },
+
+ return &j
+}
+
+func NewClassWithCollectionOfUnions_Override(c ClassWithCollectionOfUnions, unionProperty *[]*map[string]interface{}) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithCollectionOfUnions",
+ []interface{}{unionProperty},
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.BaseJsii976",
- reflect.TypeOf((*BaseJsii976)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_BaseJsii976{}
- },
+}
+
+func (j *jsiiProxy_ClassWithCollectionOfUnions)SetUnionProperty(val *[]*map[string]interface{}) {
+ _jsii_.Set(
+ j,
+ "unionProperty",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.Bell",
- reflect.TypeOf((*Bell)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"},
- _jsii_.MemberProperty{JsiiProperty: "rung", GoGetter: "Rung"},
- },
- func() interface{} {
- j := jsiiProxy_Bell{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IBell)
- return &j
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithCollections.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithCollections interface {
+ Array() *[]*string
+ SetArray(val *[]*string)
+ Map() *map[string]*string
+ SetMap(val *map[string]*string)
+}
+
+// The jsii proxy struct for ClassWithCollections
+type jsiiProxy_ClassWithCollections struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithCollections) Array() *[]*string {
+ var returns *[]*string
+ _jsii_.Get(
+ j,
+ "array",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.BinaryOperation",
- reflect.TypeOf((*BinaryOperation)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"},
- _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_BinaryOperation{}
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibOperation)
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly)
- return &j
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassWithCollections) Map() *map[string]*string {
+ var returns *map[string]*string
+ _jsii_.Get(
+ j,
+ "map",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.BurriedAnonymousObject",
- reflect.TypeOf((*BurriedAnonymousObject)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "check", GoMethod: "Check"},
- _jsii_.MemberMethod{JsiiMethod: "giveItBack", GoMethod: "GiveItBack"},
- },
- func() interface{} {
- return &jsiiProxy_BurriedAnonymousObject{}
- },
+ return returns
+}
+
+
+func NewClassWithCollections(map_ *map[string]*string, array *[]*string) ClassWithCollections {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithCollections{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithCollections",
+ []interface{}{map_, array},
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.Calculator",
- reflect.TypeOf((*Calculator)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "add", GoMethod: "Add"},
- _jsii_.MemberProperty{JsiiProperty: "curr", GoGetter: "Curr"},
- _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"},
- _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"},
- _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"},
- _jsii_.MemberProperty{JsiiProperty: "maxValue", GoGetter: "MaxValue"},
- _jsii_.MemberMethod{JsiiMethod: "mul", GoMethod: "Mul"},
- _jsii_.MemberMethod{JsiiMethod: "neg", GoMethod: "Neg"},
- _jsii_.MemberProperty{JsiiProperty: "operationsLog", GoGetter: "OperationsLog"},
- _jsii_.MemberProperty{JsiiProperty: "operationsMap", GoGetter: "OperationsMap"},
- _jsii_.MemberMethod{JsiiMethod: "pow", GoMethod: "Pow"},
- _jsii_.MemberMethod{JsiiMethod: "readUnionValue", GoMethod: "ReadUnionValue"},
- _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_Calculator{}
- _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation)
- return &j
- },
+
+ return &j
+}
+
+func NewClassWithCollections_Override(c ClassWithCollections, map_ *map[string]*string, array *[]*string) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithCollections",
+ []interface{}{map_, array},
+ c,
)
- _jsii_.RegisterStruct(
- "jsii-calc.CalculatorProps",
- reflect.TypeOf((*CalculatorProps)(nil)).Elem(),
+}
+
+func (j *jsiiProxy_ClassWithCollections)SetArray(val *[]*string) {
+ _jsii_.Set(
+ j,
+ "array",
+ val,
)
- _jsii_.RegisterStruct(
- "jsii-calc.ChildStruct982",
- reflect.TypeOf((*ChildStruct982)(nil)).Elem(),
+}
+
+func (j *jsiiProxy_ClassWithCollections)SetMap(val *map[string]*string) {
+ _jsii_.Set(
+ j,
+ "map",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassThatImplementsTheInternalInterface",
- reflect.TypeOf((*ClassThatImplementsTheInternalInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"},
- _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"},
- _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"},
- _jsii_.MemberProperty{JsiiProperty: "d", GoGetter: "D"},
- },
- func() interface{} {
- j := jsiiProxy_ClassThatImplementsTheInternalInterface{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface)
- return &j
- },
+}
+
+func ClassWithCollections_CreateAList() *[]*string {
+ _init_.Initialize()
+
+ var returns *[]*string
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ClassWithCollections",
+ "createAList",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassThatImplementsThePrivateInterface",
- reflect.TypeOf((*ClassThatImplementsThePrivateInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"},
- _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"},
- _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"},
- _jsii_.MemberProperty{JsiiProperty: "e", GoGetter: "E"},
- },
- func() interface{} {
- j := jsiiProxy_ClassThatImplementsThePrivateInterface{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_INonInternalInterface)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithCollectionOfUnions",
- reflect.TypeOf((*ClassWithCollectionOfUnions)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithCollectionOfUnions{}
- },
+
+ return returns
+}
+
+func ClassWithCollections_CreateAMap() *map[string]*string {
+ _init_.Initialize()
+
+ var returns *map[string]*string
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ClassWithCollections",
+ "createAMap",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
+
+ return returns
+}
+
+func ClassWithCollections_StaticArray() *[]*string {
+ _init_.Initialize()
+ var returns *[]*string
+ _jsii_.StaticGet(
"jsii-calc.ClassWithCollections",
- reflect.TypeOf((*ClassWithCollections)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"},
- _jsii_.MemberProperty{JsiiProperty: "map", GoGetter: "Map"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithCollections{}
- },
+ "staticArray",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithContainerTypes",
- reflect.TypeOf((*ClassWithContainerTypes)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "array", GoGetter: "Array"},
- _jsii_.MemberProperty{JsiiProperty: "obj", GoGetter: "Obj"},
- _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"},
- _jsii_.MemberProperty{JsiiProperty: "record", GoGetter: "Record"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithContainerTypes{}
- },
+ return returns
+}
+
+func ClassWithCollections_SetStaticArray(val *[]*string) {
+ _init_.Initialize()
+ _jsii_.StaticSet(
+ "jsii-calc.ClassWithCollections",
+ "staticArray",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithDocs",
- reflect.TypeOf((*ClassWithDocs)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_ClassWithDocs{}
- },
+}
+
+func ClassWithCollections_StaticMap() *map[string]*string {
+ _init_.Initialize()
+ var returns *map[string]*string
+ _jsii_.StaticGet(
+ "jsii-calc.ClassWithCollections",
+ "staticMap",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithJavaReservedWords",
- reflect.TypeOf((*ClassWithJavaReservedWords)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"},
- _jsii_.MemberProperty{JsiiProperty: "int", GoGetter: "Int"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithJavaReservedWords{}
- },
+ return returns
+}
+
+func ClassWithCollections_SetStaticMap(val *map[string]*string) {
+ _init_.Initialize()
+ _jsii_.StaticSet(
+ "jsii-calc.ClassWithCollections",
+ "staticMap",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithMutableObjectLiteralProperty",
- reflect.TypeOf((*ClassWithMutableObjectLiteralProperty)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "mutableObject", GoGetter: "MutableObject"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithMutableObjectLiteralProperty{}
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithContainerTypes.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithContainerTypes interface {
+ Array() *[]*DummyObj
+ Obj() *map[string]*DummyObj
+ Props() *ContainerProps
+ Record() *map[string]*DummyObj
+}
+
+// The jsii proxy struct for ClassWithContainerTypes
+type jsiiProxy_ClassWithContainerTypes struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithContainerTypes) Array() *[]*DummyObj {
+ var returns *[]*DummyObj
+ _jsii_.Get(
+ j,
+ "array",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithNestedUnion",
- reflect.TypeOf((*ClassWithNestedUnion)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"},
- },
- func() interface{} {
- return &jsiiProxy_ClassWithNestedUnion{}
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassWithContainerTypes) Obj() *map[string]*DummyObj {
+ var returns *map[string]*DummyObj
+ _jsii_.Get(
+ j,
+ "obj",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties",
- reflect.TypeOf((*ClassWithPrivateConstructorAndAutomaticProperties)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"},
- _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"},
- },
- func() interface{} {
- j := jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties)
- return &j
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassWithContainerTypes) Props() *ContainerProps {
+ var returns *ContainerProps
+ _jsii_.Get(
+ j,
+ "props",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ConfusingToJackson",
- reflect.TypeOf((*ConfusingToJackson)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "unionProperty", GoGetter: "UnionProperty"},
- },
- func() interface{} {
- return &jsiiProxy_ConfusingToJackson{}
- },
+ return returns
+}
+
+func (j *jsiiProxy_ClassWithContainerTypes) Record() *map[string]*DummyObj {
+ var returns *map[string]*DummyObj
+ _jsii_.Get(
+ j,
+ "record",
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.ConfusingToJacksonStruct",
- reflect.TypeOf((*ConfusingToJacksonStruct)(nil)).Elem(),
+ return returns
+}
+
+
+func NewClassWithContainerTypes(array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) ClassWithContainerTypes {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithContainerTypes{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithContainerTypes",
+ []interface{}{array, record, obj, props},
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.ConstructorPassesThisOut",
- reflect.TypeOf((*ConstructorPassesThisOut)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_ConstructorPassesThisOut{}
- },
+
+ return &j
+}
+
+func NewClassWithContainerTypes_Override(c ClassWithContainerTypes, array *[]*DummyObj, record *map[string]*DummyObj, obj *map[string]*DummyObj, props *ContainerProps) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithContainerTypes",
+ []interface{}{array, record, obj, props},
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.Constructors",
- reflect.TypeOf((*Constructors)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Constructors{}
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithDocs.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+// This class has docs.
+//
+// The docs are great. They're a bunch of tags.
+//
+// Example:
+// func anExample() {
+// }
+//
+// See: https://aws.amazon.com/
+//
+type ClassWithDocs interface {
+}
+
+// The jsii proxy struct for ClassWithDocs
+type jsiiProxy_ClassWithDocs struct {
+ _ byte // padding
+}
+
+func NewClassWithDocs() ClassWithDocs {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithDocs{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithDocs",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.ConsumePureInterface",
- reflect.TypeOf((*ConsumePureInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "workItBaby", GoMethod: "WorkItBaby"},
- },
- func() interface{} {
- return &jsiiProxy_ConsumePureInterface{}
- },
+
+ return &j
+}
+
+func NewClassWithDocs_Override(c ClassWithDocs) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithDocs",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.ConsumerCanRingBell",
- reflect.TypeOf((*ConsumerCanRingBell)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "implementedByObjectLiteral", GoMethod: "ImplementedByObjectLiteral"},
- _jsii_.MemberMethod{JsiiMethod: "implementedByPrivateClass", GoMethod: "ImplementedByPrivateClass"},
- _jsii_.MemberMethod{JsiiMethod: "implementedByPublicClass", GoMethod: "ImplementedByPublicClass"},
- _jsii_.MemberMethod{JsiiMethod: "whenTypedAsClass", GoMethod: "WhenTypedAsClass"},
- },
- func() interface{} {
- return &jsiiProxy_ConsumerCanRingBell{}
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithJavaReservedWords.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithJavaReservedWords interface {
+ Int() *string
+ Import(assert *string) *string
+}
+
+// The jsii proxy struct for ClassWithJavaReservedWords
+type jsiiProxy_ClassWithJavaReservedWords struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithJavaReservedWords) Int() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "int",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ConsumersOfThisCrazyTypeSystem",
- reflect.TypeOf((*ConsumersOfThisCrazyTypeSystem)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "consumeAnotherPublicInterface", GoMethod: "ConsumeAnotherPublicInterface"},
- _jsii_.MemberMethod{JsiiMethod: "consumeNonInternalInterface", GoMethod: "ConsumeNonInternalInterface"},
- },
- func() interface{} {
- return &jsiiProxy_ConsumersOfThisCrazyTypeSystem{}
- },
+ return returns
+}
+
+
+func NewClassWithJavaReservedWords(int *string) ClassWithJavaReservedWords {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithJavaReservedWords{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithJavaReservedWords",
+ []interface{}{int},
+ &j,
)
- _jsii_.RegisterStruct(
- "jsii-calc.ContainerProps",
- reflect.TypeOf((*ContainerProps)(nil)).Elem(),
+
+ return &j
+}
+
+func NewClassWithJavaReservedWords_Override(c ClassWithJavaReservedWords, int *string) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithJavaReservedWords",
+ []interface{}{int},
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.DataRenderer",
- reflect.TypeOf((*DataRenderer)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "render", GoMethod: "Render"},
- _jsii_.MemberMethod{JsiiMethod: "renderArbitrary", GoMethod: "RenderArbitrary"},
- _jsii_.MemberMethod{JsiiMethod: "renderMap", GoMethod: "RenderMap"},
- },
- func() interface{} {
- return &jsiiProxy_DataRenderer{}
- },
+}
+
+func (c *jsiiProxy_ClassWithJavaReservedWords) Import(assert *string) *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ c,
+ "import",
+ []interface{}{assert},
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.Default",
- reflect.TypeOf((*Default)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "pleaseCompile", GoMethod: "PleaseCompile"},
- },
- func() interface{} {
- return &jsiiProxy_Default{}
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithMutableObjectLiteralProperty.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithMutableObjectLiteralProperty interface {
+ MutableObject() IMutableObjectLiteral
+ SetMutableObject(val IMutableObjectLiteral)
+}
+
+// The jsii proxy struct for ClassWithMutableObjectLiteralProperty
+type jsiiProxy_ClassWithMutableObjectLiteralProperty struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty) MutableObject() IMutableObjectLiteral {
+ var returns IMutableObjectLiteral
+ _jsii_.Get(
+ j,
+ "mutableObject",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.DefaultedConstructorArgument",
- reflect.TypeOf((*DefaultedConstructorArgument)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"},
- _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"},
- _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"},
- },
- func() interface{} {
- return &jsiiProxy_DefaultedConstructorArgument{}
- },
+ return returns
+}
+
+
+func NewClassWithMutableObjectLiteralProperty() ClassWithMutableObjectLiteralProperty {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithMutableObjectLiteralProperty{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithMutableObjectLiteralProperty",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.Demonstrate982",
- reflect.TypeOf((*Demonstrate982)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Demonstrate982{}
- },
+
+ return &j
+}
+
+func NewClassWithMutableObjectLiteralProperty_Override(c ClassWithMutableObjectLiteralProperty) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithMutableObjectLiteralProperty",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.DeprecatedClass",
- reflect.TypeOf((*DeprecatedClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"},
- },
- func() interface{} {
- return &jsiiProxy_DeprecatedClass{}
- },
+}
+
+func (j *jsiiProxy_ClassWithMutableObjectLiteralProperty)SetMutableObject(val IMutableObjectLiteral) {
+ _jsii_.Set(
+ j,
+ "mutableObject",
+ val,
)
- _jsii_.RegisterEnum(
- "jsii-calc.DeprecatedEnum",
- reflect.TypeOf((*DeprecatedEnum)(nil)).Elem(),
- map[string]interface{}{
- "OPTION_A": DeprecatedEnum_OPTION_A,
- "OPTION_B": DeprecatedEnum_OPTION_B,
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.DeprecatedStruct",
- reflect.TypeOf((*DeprecatedStruct)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.DerivedStruct",
- reflect.TypeOf((*DerivedStruct)(nil)).Elem(),
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithNestedUnion.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ClassWithNestedUnion interface {
+ UnionProperty() *[]interface{}
+ SetUnionProperty(val *[]interface{})
+}
+
+// The jsii proxy struct for ClassWithNestedUnion
+type jsiiProxy_ClassWithNestedUnion struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ClassWithNestedUnion) UnionProperty() *[]interface{} {
+ var returns *[]interface{}
+ _jsii_.Get(
+ j,
+ "unionProperty",
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DiamondBottom",
- reflect.TypeOf((*DiamondBottom)(nil)).Elem(),
+ return returns
+}
+
+
+func NewClassWithNestedUnion(unionProperty *[]interface{}) ClassWithNestedUnion {
+ _init_.Initialize()
+
+ j := jsiiProxy_ClassWithNestedUnion{}
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithNestedUnion",
+ []interface{}{unionProperty},
+ &j,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DiamondInheritanceBaseLevelStruct",
- reflect.TypeOf((*DiamondInheritanceBaseLevelStruct)(nil)).Elem(),
+
+ return &j
+}
+
+func NewClassWithNestedUnion_Override(c ClassWithNestedUnion, unionProperty *[]interface{}) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ClassWithNestedUnion",
+ []interface{}{unionProperty},
+ c,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DiamondInheritanceFirstMidLevelStruct",
- reflect.TypeOf((*DiamondInheritanceFirstMidLevelStruct)(nil)).Elem(),
+}
+
+func (j *jsiiProxy_ClassWithNestedUnion)SetUnionProperty(val *[]interface{}) {
+ _jsii_.Set(
+ j,
+ "unionProperty",
+ val,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DiamondInheritanceSecondMidLevelStruct",
- reflect.TypeOf((*DiamondInheritanceSecondMidLevelStruct)(nil)).Elem(),
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ClassWithPrivateConstructorAndAutomaticProperties.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+// Class that implements interface properties automatically, but using a private constructor.
+type ClassWithPrivateConstructorAndAutomaticProperties interface {
+ IInterfaceWithProperties
+ ReadOnlyString() *string
+ ReadWriteString() *string
+ SetReadWriteString(val *string)
+}
+
+// The jsii proxy struct for ClassWithPrivateConstructorAndAutomaticProperties
+type jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties struct {
+ jsiiProxy_IInterfaceWithProperties
+}
+
+func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadOnlyString() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "readOnlyString",
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DiamondInheritanceTopLevelStruct",
- reflect.TypeOf((*DiamondInheritanceTopLevelStruct)(nil)).Elem(),
+ return returns
+}
+
+func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties) ReadWriteString() *string {
+ var returns *string
+ _jsii_.Get(
+ j,
+ "readWriteString",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.DisappointingCollectionSource",
- reflect.TypeOf((*DisappointingCollectionSource)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_DisappointingCollectionSource{}
- },
+ return returns
+}
+
+
+func (j *jsiiProxy_ClassWithPrivateConstructorAndAutomaticProperties)SetReadWriteString(val *string) {
+ _jsii_.Set(
+ j,
+ "readWriteString",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.DoNotOverridePrivates",
- reflect.TypeOf((*DoNotOverridePrivates)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "changePrivatePropertyValue", GoMethod: "ChangePrivatePropertyValue"},
- _jsii_.MemberMethod{JsiiMethod: "privateMethodValue", GoMethod: "PrivateMethodValue"},
- _jsii_.MemberMethod{JsiiMethod: "privatePropertyValue", GoMethod: "PrivatePropertyValue"},
- },
- func() interface{} {
- return &jsiiProxy_DoNotOverridePrivates{}
- },
+}
+
+func ClassWithPrivateConstructorAndAutomaticProperties_Create(readOnlyString *string, readWriteString *string) ClassWithPrivateConstructorAndAutomaticProperties {
+ _init_.Initialize()
+
+ var returns ClassWithPrivateConstructorAndAutomaticProperties
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties",
+ "create",
+ []interface{}{readOnlyString, readWriteString},
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.DoNotRecognizeAnyAsOptional",
- reflect.TypeOf((*DoNotRecognizeAnyAsOptional)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- },
- func() interface{} {
- return &jsiiProxy_DoNotRecognizeAnyAsOptional{}
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJackson.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+// This tries to confuse Jackson by having overloaded property setters.
+// See: https://github.com/aws/aws-cdk/issues/4080
+//
+type ConfusingToJackson interface {
+ UnionProperty() interface{}
+ SetUnionProperty(val interface{})
+}
+
+// The jsii proxy struct for ConfusingToJackson
+type jsiiProxy_ConfusingToJackson struct {
+ _ byte // padding
+}
+
+func (j *jsiiProxy_ConfusingToJackson) UnionProperty() interface{} {
+ var returns interface{}
+ _jsii_.Get(
+ j,
+ "unionProperty",
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.DocumentedClass",
- reflect.TypeOf((*DocumentedClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "greet", GoMethod: "Greet"},
- _jsii_.MemberMethod{JsiiMethod: "hola", GoMethod: "Hola"},
- },
- func() interface{} {
- return &jsiiProxy_DocumentedClass{}
- },
+ return returns
+}
+
+
+func (j *jsiiProxy_ConfusingToJackson)SetUnionProperty(val interface{}) {
+ _jsii_.Set(
+ j,
+ "unionProperty",
+ val,
)
- _jsii_.RegisterClass(
- "jsii-calc.DontComplainAboutVariadicAfterOptional",
- reflect.TypeOf((*DontComplainAboutVariadicAfterOptional)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "optionalAndVariadic", GoMethod: "OptionalAndVariadic"},
- },
- func() interface{} {
- return &jsiiProxy_DontComplainAboutVariadicAfterOptional{}
- },
+}
+
+func ConfusingToJackson_MakeInstance() ConfusingToJackson {
+ _init_.Initialize()
+
+ var returns ConfusingToJackson
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConfusingToJackson",
+ "makeInstance",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.DoubleTrouble",
- reflect.TypeOf((*DoubleTrouble)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"},
- },
- func() interface{} {
- j := jsiiProxy_DoubleTrouble{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlyRandomGenerator)
- return &j
- },
+
+ return returns
+}
+
+func ConfusingToJackson_MakeStructInstance() *ConfusingToJacksonStruct {
+ _init_.Initialize()
+
+ var returns *ConfusingToJacksonStruct
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConfusingToJackson",
+ "makeStructInstance",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.DummyObj",
- reflect.TypeOf((*DummyObj)(nil)).Elem(),
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConfusingToJacksonStruct.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+
+type ConfusingToJacksonStruct struct {
+ UnionProperty interface{} \`field:"optional" json:"unionProperty" yaml:"unionProperty"\`
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConstructorPassesThisOut.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ConstructorPassesThisOut interface {
+}
+
+// The jsii proxy struct for ConstructorPassesThisOut
+type jsiiProxy_ConstructorPassesThisOut struct {
+ _ byte // padding
+}
+
+func NewConstructorPassesThisOut(consumer PartiallyInitializedThisConsumer) ConstructorPassesThisOut {
+ _init_.Initialize()
+
+ j := jsiiProxy_ConstructorPassesThisOut{}
+
+ _jsii_.Create(
+ "jsii-calc.ConstructorPassesThisOut",
+ []interface{}{consumer},
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.DynamicPropertyBearer",
- reflect.TypeOf((*DynamicPropertyBearer)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"},
- _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"},
- },
- func() interface{} {
- return &jsiiProxy_DynamicPropertyBearer{}
- },
+
+ return &j
+}
+
+func NewConstructorPassesThisOut_Override(c ConstructorPassesThisOut, consumer PartiallyInitializedThisConsumer) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ConstructorPassesThisOut",
+ []interface{}{consumer},
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.DynamicPropertyBearerChild",
- reflect.TypeOf((*DynamicPropertyBearerChild)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "dynamicProperty", GoGetter: "DynamicProperty"},
- _jsii_.MemberProperty{JsiiProperty: "originalValue", GoGetter: "OriginalValue"},
- _jsii_.MemberMethod{JsiiMethod: "overrideValue", GoMethod: "OverrideValue"},
- _jsii_.MemberProperty{JsiiProperty: "valueStore", GoGetter: "ValueStore"},
- },
- func() interface{} {
- j := jsiiProxy_DynamicPropertyBearerChild{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_DynamicPropertyBearer)
- return &j
- },
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/Constructors.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type Constructors interface {
+}
+
+// The jsii proxy struct for Constructors
+type jsiiProxy_Constructors struct {
+ _ byte // padding
+}
+
+func NewConstructors() Constructors {
+ _init_.Initialize()
+
+ j := jsiiProxy_Constructors{}
+
+ _jsii_.Create(
+ "jsii-calc.Constructors",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterClass(
- "jsii-calc.Entropy",
- reflect.TypeOf((*Entropy)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "increase", GoMethod: "Increase"},
- _jsii_.MemberMethod{JsiiMethod: "repeat", GoMethod: "Repeat"},
- },
- func() interface{} {
- return &jsiiProxy_Entropy{}
- },
+
+ return &j
+}
+
+func NewConstructors_Override(c Constructors) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.Constructors",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.EnumDispenser",
- reflect.TypeOf((*EnumDispenser)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_EnumDispenser{}
- },
+}
+
+func Constructors_HiddenInterface() IPublicInterface {
+ _init_.Initialize()
+
+ var returns IPublicInterface
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "hiddenInterface",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.EraseUndefinedHashValues",
- reflect.TypeOf((*EraseUndefinedHashValues)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_EraseUndefinedHashValues{}
- },
+
+ return returns
+}
+
+func Constructors_HiddenInterfaces() *[]IPublicInterface {
+ _init_.Initialize()
+
+ var returns *[]IPublicInterface
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "hiddenInterfaces",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.EraseUndefinedHashValuesOptions",
- reflect.TypeOf((*EraseUndefinedHashValuesOptions)(nil)).Elem(),
+
+ return returns
+}
+
+func Constructors_HiddenSubInterfaces() *[]IPublicInterface {
+ _init_.Initialize()
+
+ var returns *[]IPublicInterface
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "hiddenSubInterfaces",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ExperimentalClass",
- reflect.TypeOf((*ExperimentalClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"},
- },
- func() interface{} {
- return &jsiiProxy_ExperimentalClass{}
- },
+
+ return returns
+}
+
+func Constructors_MakeClass() PublicClass {
+ _init_.Initialize()
+
+ var returns PublicClass
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "makeClass",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterEnum(
- "jsii-calc.ExperimentalEnum",
- reflect.TypeOf((*ExperimentalEnum)(nil)).Elem(),
- map[string]interface{}{
- "OPTION_A": ExperimentalEnum_OPTION_A,
- "OPTION_B": ExperimentalEnum_OPTION_B,
- },
+
+ return returns
+}
+
+func Constructors_MakeInterface() IPublicInterface {
+ _init_.Initialize()
+
+ var returns IPublicInterface
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "makeInterface",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterStruct(
- "jsii-calc.ExperimentalStruct",
- reflect.TypeOf((*ExperimentalStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.ExportedBaseClass",
- reflect.TypeOf((*ExportedBaseClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"},
- },
- func() interface{} {
- return &jsiiProxy_ExportedBaseClass{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.ExtendsInternalInterface",
- reflect.TypeOf((*ExtendsInternalInterface)(nil)).Elem(),
+
+ return returns
+}
+
+func Constructors_MakeInterface2() IPublicInterface2 {
+ _init_.Initialize()
+
+ var returns IPublicInterface2
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "makeInterface2",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.ExternalClass",
- reflect.TypeOf((*ExternalClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"},
- },
- func() interface{} {
- return &jsiiProxy_ExternalClass{}
- },
+
+ return returns
+}
+
+func Constructors_MakeInterfaces() *[]IPublicInterface {
+ _init_.Initialize()
+
+ var returns *[]IPublicInterface
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.Constructors",
+ "makeInterfaces",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterEnum(
- "jsii-calc.ExternalEnum",
- reflect.TypeOf((*ExternalEnum)(nil)).Elem(),
- map[string]interface{}{
- "OPTION_A": ExternalEnum_OPTION_A,
- "OPTION_B": ExternalEnum_OPTION_B,
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumePureInterface.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ConsumePureInterface interface {
+ WorkItBaby() *StructB
+}
+
+// The jsii proxy struct for ConsumePureInterface
+type jsiiProxy_ConsumePureInterface struct {
+ _ byte // padding
+}
+
+func NewConsumePureInterface(delegate IStructReturningDelegate) ConsumePureInterface {
+ _init_.Initialize()
+
+ j := jsiiProxy_ConsumePureInterface{}
+
+ _jsii_.Create(
+ "jsii-calc.ConsumePureInterface",
+ []interface{}{delegate},
+ &j,
)
- _jsii_.RegisterStruct(
- "jsii-calc.ExternalStruct",
- reflect.TypeOf((*ExternalStruct)(nil)).Elem(),
+
+ return &j
+}
+
+func NewConsumePureInterface_Override(c ConsumePureInterface, delegate IStructReturningDelegate) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ConsumePureInterface",
+ []interface{}{delegate},
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.FullCombo",
- reflect.TypeOf((*FullCombo)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- j := jsiiProxy_FullCombo{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_BaseClass)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IIndirectlyImplemented)
- return &j
- },
+}
+
+func (c *jsiiProxy_ConsumePureInterface) WorkItBaby() *StructB {
+ var returns *StructB
+
+ _jsii_.Invoke(
+ c,
+ "workItBaby",
+ nil, // no parameters
+ &returns,
)
- _jsii_.RegisterClass(
- "jsii-calc.GiveMeStructs",
- reflect.TypeOf((*GiveMeStructs)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "derivedToFirst", GoMethod: "DerivedToFirst"},
- _jsii_.MemberMethod{JsiiMethod: "readDerivedNonPrimitive", GoMethod: "ReadDerivedNonPrimitive"},
- _jsii_.MemberMethod{JsiiMethod: "readFirstNumber", GoMethod: "ReadFirstNumber"},
- _jsii_.MemberProperty{JsiiProperty: "structLiteral", GoGetter: "StructLiteral"},
- },
- func() interface{} {
- return &jsiiProxy_GiveMeStructs{}
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumerCanRingBell.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+// Test calling back to consumers that implement interfaces.
+//
+// Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call
+// the method on the argument that they're passed...
+type ConsumerCanRingBell interface {
+ // ...if the interface is implemented using an object literal.
+ //
+ // Returns whether the bell was rung.
+ ImplementedByObjectLiteral(ringer IBellRinger) *bool
+ // ...if the interface is implemented using a private class.
+ //
+ // Return whether the bell was rung.
+ ImplementedByPrivateClass(ringer IBellRinger) *bool
+ // ...if the interface is implemented using a public class.
+ //
+ // Return whether the bell was rung.
+ ImplementedByPublicClass(ringer IBellRinger) *bool
+ // If the parameter is a concrete class instead of an interface.
+ //
+ // Return whether the bell was rung.
+ WhenTypedAsClass(ringer IConcreteBellRinger) *bool
+}
+
+// The jsii proxy struct for ConsumerCanRingBell
+type jsiiProxy_ConsumerCanRingBell struct {
+ _ byte // padding
+}
+
+func NewConsumerCanRingBell() ConsumerCanRingBell {
+ _init_.Initialize()
+
+ j := jsiiProxy_ConsumerCanRingBell{}
+
+ _jsii_.Create(
+ "jsii-calc.ConsumerCanRingBell",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterStruct(
- "jsii-calc.Greetee",
- reflect.TypeOf((*Greetee)(nil)).Elem(),
+
+ return &j
+}
+
+func NewConsumerCanRingBell_Override(c ConsumerCanRingBell) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ConsumerCanRingBell",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterClass(
- "jsii-calc.GreetingAugmenter",
- reflect.TypeOf((*GreetingAugmenter)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "betterGreeting", GoMethod: "BetterGreeting"},
- },
- func() interface{} {
- return &jsiiProxy_GreetingAugmenter{}
- },
+}
+
+// ...if the interface is implemented using an object literal.
+//
+// Returns whether the bell was rung.
+func ConsumerCanRingBell_StaticImplementedByObjectLiteral(ringer IBellRinger) *bool {
+ _init_.Initialize()
+
+ var returns *bool
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConsumerCanRingBell",
+ "staticImplementedByObjectLiteral",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IAnonymousImplementationProvider",
- reflect.TypeOf((*IAnonymousImplementationProvider)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "provideAsClass", GoMethod: "ProvideAsClass"},
- _jsii_.MemberMethod{JsiiMethod: "provideAsInterface", GoMethod: "ProvideAsInterface"},
- },
- func() interface{} {
- return &jsiiProxy_IAnonymousImplementationProvider{}
- },
+
+ return returns
+}
+
+// ...if the interface is implemented using a private class.
+//
+// Return whether the bell was rung.
+func ConsumerCanRingBell_StaticImplementedByPrivateClass(ringer IBellRinger) *bool {
+ _init_.Initialize()
+
+ var returns *bool
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConsumerCanRingBell",
+ "staticImplementedByPrivateClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IAnonymouslyImplementMe",
- reflect.TypeOf((*IAnonymouslyImplementMe)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- _jsii_.MemberMethod{JsiiMethod: "verb", GoMethod: "Verb"},
- },
- func() interface{} {
- return &jsiiProxy_IAnonymouslyImplementMe{}
- },
+
+ return returns
+}
+
+// ...if the interface is implemented using a public class.
+//
+// Return whether the bell was rung.
+func ConsumerCanRingBell_StaticImplementedByPublicClass(ringer IBellRinger) *bool {
+ _init_.Initialize()
+
+ var returns *bool
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConsumerCanRingBell",
+ "staticImplementedByPublicClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IAnotherPublicInterface",
- reflect.TypeOf((*IAnotherPublicInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"},
- },
- func() interface{} {
- return &jsiiProxy_IAnotherPublicInterface{}
- },
+
+ return returns
+}
+
+// If the parameter is a concrete class instead of an interface.
+//
+// Return whether the bell was rung.
+func ConsumerCanRingBell_StaticWhenTypedAsClass(ringer IConcreteBellRinger) *bool {
+ _init_.Initialize()
+
+ var returns *bool
+
+ _jsii_.StaticInvoke(
+ "jsii-calc.ConsumerCanRingBell",
+ "staticWhenTypedAsClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IBell",
- reflect.TypeOf((*IBell)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "ring", GoMethod: "Ring"},
- },
- func() interface{} {
- return &jsiiProxy_IBell{}
- },
+
+ return returns
+}
+
+func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByObjectLiteral(ringer IBellRinger) *bool {
+ var returns *bool
+
+ _jsii_.Invoke(
+ c,
+ "implementedByObjectLiteral",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IBellRinger",
- reflect.TypeOf((*IBellRinger)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"},
- },
- func() interface{} {
- return &jsiiProxy_IBellRinger{}
- },
+
+ return returns
+}
+
+func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPrivateClass(ringer IBellRinger) *bool {
+ var returns *bool
+
+ _jsii_.Invoke(
+ c,
+ "implementedByPrivateClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IConcreteBellRinger",
- reflect.TypeOf((*IConcreteBellRinger)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "yourTurn", GoMethod: "YourTurn"},
- },
- func() interface{} {
- return &jsiiProxy_IConcreteBellRinger{}
- },
+
+ return returns
+}
+
+func (c *jsiiProxy_ConsumerCanRingBell) ImplementedByPublicClass(ringer IBellRinger) *bool {
+ var returns *bool
+
+ _jsii_.Invoke(
+ c,
+ "implementedByPublicClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IDeprecatedInterface",
- reflect.TypeOf((*IDeprecatedInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- },
- func() interface{} {
- return &jsiiProxy_IDeprecatedInterface{}
- },
+
+ return returns
+}
+
+func (c *jsiiProxy_ConsumerCanRingBell) WhenTypedAsClass(ringer IConcreteBellRinger) *bool {
+ var returns *bool
+
+ _jsii_.Invoke(
+ c,
+ "whenTypedAsClass",
+ []interface{}{ringer},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IExperimentalInterface",
- reflect.TypeOf((*IExperimentalInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- },
- func() interface{} {
- return &jsiiProxy_IExperimentalInterface{}
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ConsumersOfThisCrazyTypeSystem.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+import (
+ _jsii_ "github.com/aws/jsii-runtime-go/runtime"
+ _init_ "github.com/aws/jsii/jsii-calc/go/jsiicalc/v3/jsii"
+)
+
+type ConsumersOfThisCrazyTypeSystem interface {
+ ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string
+ ConsumeNonInternalInterface(obj INonInternalInterface) interface{}
+}
+
+// The jsii proxy struct for ConsumersOfThisCrazyTypeSystem
+type jsiiProxy_ConsumersOfThisCrazyTypeSystem struct {
+ _ byte // padding
+}
+
+func NewConsumersOfThisCrazyTypeSystem() ConsumersOfThisCrazyTypeSystem {
+ _init_.Initialize()
+
+ j := jsiiProxy_ConsumersOfThisCrazyTypeSystem{}
+
+ _jsii_.Create(
+ "jsii-calc.ConsumersOfThisCrazyTypeSystem",
+ nil, // no parameters
+ &j,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IExtendsPrivateInterface",
- reflect.TypeOf((*IExtendsPrivateInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "moreThings", GoGetter: "MoreThings"},
- _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"},
- },
- func() interface{} {
- return &jsiiProxy_IExtendsPrivateInterface{}
- },
+
+ return &j
+}
+
+func NewConsumersOfThisCrazyTypeSystem_Override(c ConsumersOfThisCrazyTypeSystem) {
+ _init_.Initialize()
+
+ _jsii_.Create(
+ "jsii-calc.ConsumersOfThisCrazyTypeSystem",
+ nil, // no parameters
+ c,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IExternalInterface",
- reflect.TypeOf((*IExternalInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- },
- func() interface{} {
- return &jsiiProxy_IExternalInterface{}
- },
+}
+
+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeAnotherPublicInterface(obj IAnotherPublicInterface) *string {
+ var returns *string
+
+ _jsii_.Invoke(
+ c,
+ "consumeAnotherPublicInterface",
+ []interface{}{obj},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IFriendlier",
- reflect.TypeOf((*IFriendlier)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"},
- _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"},
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- },
- func() interface{} {
- j := jsiiProxy_IFriendlier{}
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly)
- return &j
- },
+
+ return returns
+}
+
+func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(obj INonInternalInterface) interface{} {
+ var returns interface{}
+
+ _jsii_.Invoke(
+ c,
+ "consumeNonInternalInterface",
+ []interface{}{obj},
+ &returns,
)
- _jsii_.RegisterInterface(
- "jsii-calc.IFriendlyRandomGenerator",
- reflect.TypeOf((*IFriendlyRandomGenerator)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"},
- },
- func() interface{} {
- j := jsiiProxy_IFriendlyRandomGenerator{}
- _jsii_.InitJsiiProxy(&j.Type__scopejsiicalclibIFriendly)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator)
- return &j
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IIndirectlyImplemented",
- reflect.TypeOf((*IIndirectlyImplemented)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- return &jsiiProxy_IIndirectlyImplemented{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceImplementedByAbstractClass",
- reflect.TypeOf((*IInterfaceImplementedByAbstractClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "propFromInterface", GoGetter: "PropFromInterface"},
- },
- func() interface{} {
- return &jsiiProxy_IInterfaceImplementedByAbstractClass{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceThatShouldNotBeADataType",
- reflect.TypeOf((*IInterfaceThatShouldNotBeADataType)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"},
- _jsii_.MemberProperty{JsiiProperty: "otherValue", GoGetter: "OtherValue"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_IInterfaceThatShouldNotBeADataType{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithMethods)
- return &j
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceWithInternal",
- reflect.TypeOf((*IInterfaceWithInternal)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"},
- },
- func() interface{} {
- return &jsiiProxy_IInterfaceWithInternal{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceWithMethods",
- reflect.TypeOf((*IInterfaceWithMethods)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "doThings", GoMethod: "DoThings"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- return &jsiiProxy_IInterfaceWithMethods{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceWithOptionalMethodArguments",
- reflect.TypeOf((*IInterfaceWithOptionalMethodArguments)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- },
- func() interface{} {
- return &jsiiProxy_IInterfaceWithOptionalMethodArguments{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceWithProperties",
- reflect.TypeOf((*IInterfaceWithProperties)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"},
- _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"},
- },
- func() interface{} {
- return &jsiiProxy_IInterfaceWithProperties{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IInterfaceWithPropertiesExtension",
- reflect.TypeOf((*IInterfaceWithPropertiesExtension)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"},
- _jsii_.MemberProperty{JsiiProperty: "readOnlyString", GoGetter: "ReadOnlyString"},
- _jsii_.MemberProperty{JsiiProperty: "readWriteString", GoGetter: "ReadWriteString"},
- },
- func() interface{} {
- j := jsiiProxy_IInterfaceWithPropertiesExtension{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithProperties)
- return &j
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJSII417Derived",
- reflect.TypeOf((*IJSII417Derived)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"},
- _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"},
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"},
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- j := jsiiProxy_IJSII417Derived{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IJSII417PublicBaseOfBase)
- return &j
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJSII417PublicBaseOfBase",
- reflect.TypeOf((*IJSII417PublicBaseOfBase)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"},
- },
- func() interface{} {
- return &jsiiProxy_IJSII417PublicBaseOfBase{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJavaReservedWordsInAnInterface",
- reflect.TypeOf((*IJavaReservedWordsInAnInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"},
- _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"},
- _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"},
- _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"},
- _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"},
- _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"},
- _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"},
- _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"},
- _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"},
- _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"},
- _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"},
- _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"},
- _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"},
- _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"},
- _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"},
- _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"},
- _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"},
- _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"},
- _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"},
- _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"},
- _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"},
- _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"},
- _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"},
- _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"},
- _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"},
- _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"},
- _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"},
- _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"},
- _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"},
- _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"},
- _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"},
- _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"},
- _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"},
- _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"},
- _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"},
- _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"},
- _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"},
- _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"},
- _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"},
- _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"},
- _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"},
- _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"},
- _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"},
- _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"},
- _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"},
- _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"},
- _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"},
- _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"},
- _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"},
- _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"},
- _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"},
- _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"},
- },
- func() interface{} {
- return &jsiiProxy_IJavaReservedWordsInAnInterface{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJsii487External",
- reflect.TypeOf((*IJsii487External)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_IJsii487External{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJsii487External2",
- reflect.TypeOf((*IJsii487External2)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_IJsii487External2{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IJsii496",
- reflect.TypeOf((*IJsii496)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_IJsii496{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IMutableObjectLiteral",
- reflect.TypeOf((*IMutableObjectLiteral)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- return &jsiiProxy_IMutableObjectLiteral{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.INonInternalInterface",
- reflect.TypeOf((*INonInternalInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "a", GoGetter: "A"},
- _jsii_.MemberProperty{JsiiProperty: "b", GoGetter: "B"},
- _jsii_.MemberProperty{JsiiProperty: "c", GoGetter: "C"},
- },
- func() interface{} {
- j := jsiiProxy_INonInternalInterface{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IAnotherPublicInterface)
- return &j
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IObjectWithProperty",
- reflect.TypeOf((*IObjectWithProperty)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- _jsii_.MemberMethod{JsiiMethod: "wasSet", GoMethod: "WasSet"},
- },
- func() interface{} {
- return &jsiiProxy_IObjectWithProperty{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IOptionalMethod",
- reflect.TypeOf((*IOptionalMethod)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "optional", GoMethod: "Optional"},
- },
- func() interface{} {
- return &jsiiProxy_IOptionalMethod{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IPrivatelyImplemented",
- reflect.TypeOf((*IPrivatelyImplemented)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "success", GoGetter: "Success"},
- },
- func() interface{} {
- return &jsiiProxy_IPrivatelyImplemented{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IPublicInterface",
- reflect.TypeOf((*IPublicInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "bye", GoMethod: "Bye"},
- },
- func() interface{} {
- return &jsiiProxy_IPublicInterface{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IPublicInterface2",
- reflect.TypeOf((*IPublicInterface2)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"},
- },
- func() interface{} {
- return &jsiiProxy_IPublicInterface2{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IRandomNumberGenerator",
- reflect.TypeOf((*IRandomNumberGenerator)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"},
- },
- func() interface{} {
- return &jsiiProxy_IRandomNumberGenerator{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IReturnJsii976",
- reflect.TypeOf((*IReturnJsii976)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"},
- },
- func() interface{} {
- return &jsiiProxy_IReturnJsii976{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IReturnsNumber",
- reflect.TypeOf((*IReturnsNumber)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "numberProp", GoGetter: "NumberProp"},
- _jsii_.MemberMethod{JsiiMethod: "obtainNumber", GoMethod: "ObtainNumber"},
- },
- func() interface{} {
- return &jsiiProxy_IReturnsNumber{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IStableInterface",
- reflect.TypeOf((*IStableInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- },
- func() interface{} {
- return &jsiiProxy_IStableInterface{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IStructReturningDelegate",
- reflect.TypeOf((*IStructReturningDelegate)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "returnStruct", GoMethod: "ReturnStruct"},
- },
- func() interface{} {
- return &jsiiProxy_IStructReturningDelegate{}
- },
- )
- _jsii_.RegisterInterface(
- "jsii-calc.IWallClock",
- reflect.TypeOf((*IWallClock)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "iso8601Now", GoMethod: "Iso8601Now"},
- },
- func() interface{} {
- return &jsiiProxy_IWallClock{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ImplementInternalInterface",
- reflect.TypeOf((*ImplementInternalInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "prop", GoGetter: "Prop"},
- },
- func() interface{} {
- return &jsiiProxy_ImplementInternalInterface{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Implementation",
- reflect.TypeOf((*Implementation)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- return &jsiiProxy_Implementation{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ImplementsInterfaceWithInternal",
- reflect.TypeOf((*ImplementsInterfaceWithInternal)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"},
- },
- func() interface{} {
- j := jsiiProxy_ImplementsInterfaceWithInternal{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IInterfaceWithInternal)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ImplementsInterfaceWithInternalSubclass",
- reflect.TypeOf((*ImplementsInterfaceWithInternalSubclass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "visible", GoMethod: "Visible"},
- },
- func() interface{} {
- j := jsiiProxy_ImplementsInterfaceWithInternalSubclass{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_ImplementsInterfaceWithInternal)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ImplementsPrivateInterface",
- reflect.TypeOf((*ImplementsPrivateInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "private", GoGetter: "Private"},
- },
- func() interface{} {
- return &jsiiProxy_ImplementsPrivateInterface{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.ImplictBaseOfBase",
- reflect.TypeOf((*ImplictBaseOfBase)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.InbetweenClass",
- reflect.TypeOf((*InbetweenClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "ciao", GoMethod: "Ciao"},
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- },
- func() interface{} {
- j := jsiiProxy_InbetweenClass{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_PublicClass)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IPublicInterface2)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.InterfaceCollections",
- reflect.TypeOf((*InterfaceCollections)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_InterfaceCollections{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.InterfacesMaker",
- reflect.TypeOf((*InterfacesMaker)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_InterfacesMaker{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Isomorphism",
- reflect.TypeOf((*Isomorphism)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "myself", GoMethod: "Myself"},
- },
- func() interface{} {
- return &jsiiProxy_Isomorphism{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Issue2638",
- reflect.TypeOf((*Issue2638)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Issue2638{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Issue2638B",
- reflect.TypeOf((*Issue2638B)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_Issue2638B{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JSII417Derived",
- reflect.TypeOf((*JSII417Derived)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "bar", GoMethod: "Bar"},
- _jsii_.MemberMethod{JsiiMethod: "baz", GoMethod: "Baz"},
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"},
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- },
- func() interface{} {
- j := jsiiProxy_JSII417Derived{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_JSII417PublicBaseOfBase)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JSII417PublicBaseOfBase",
- reflect.TypeOf((*JSII417PublicBaseOfBase)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "foo", GoMethod: "Foo"},
- _jsii_.MemberProperty{JsiiProperty: "hasRoot", GoGetter: "HasRoot"},
- },
- func() interface{} {
- return &jsiiProxy_JSII417PublicBaseOfBase{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JSObjectLiteralForInterface",
- reflect.TypeOf((*JSObjectLiteralForInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "giveMeFriendly", GoMethod: "GiveMeFriendly"},
- _jsii_.MemberMethod{JsiiMethod: "giveMeFriendlyGenerator", GoMethod: "GiveMeFriendlyGenerator"},
- },
- func() interface{} {
- return &jsiiProxy_JSObjectLiteralForInterface{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JSObjectLiteralToNative",
- reflect.TypeOf((*JSObjectLiteralToNative)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "returnLiteral", GoMethod: "ReturnLiteral"},
- },
- func() interface{} {
- return &jsiiProxy_JSObjectLiteralToNative{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JSObjectLiteralToNativeClass",
- reflect.TypeOf((*JSObjectLiteralToNativeClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "propA", GoGetter: "PropA"},
- _jsii_.MemberProperty{JsiiProperty: "propB", GoGetter: "PropB"},
- },
- func() interface{} {
- return &jsiiProxy_JSObjectLiteralToNativeClass{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JavaReservedWords",
- reflect.TypeOf((*JavaReservedWords)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "abstract", GoMethod: "Abstract"},
- _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"},
- _jsii_.MemberMethod{JsiiMethod: "boolean", GoMethod: "Boolean"},
- _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"},
- _jsii_.MemberMethod{JsiiMethod: "byte", GoMethod: "Byte"},
- _jsii_.MemberMethod{JsiiMethod: "case", GoMethod: "Case"},
- _jsii_.MemberMethod{JsiiMethod: "catch", GoMethod: "Catch"},
- _jsii_.MemberMethod{JsiiMethod: "char", GoMethod: "Char"},
- _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"},
- _jsii_.MemberMethod{JsiiMethod: "const", GoMethod: "Const"},
- _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"},
- _jsii_.MemberMethod{JsiiMethod: "default", GoMethod: "Default"},
- _jsii_.MemberMethod{JsiiMethod: "do", GoMethod: "Do"},
- _jsii_.MemberMethod{JsiiMethod: "double", GoMethod: "Double"},
- _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"},
- _jsii_.MemberMethod{JsiiMethod: "enum", GoMethod: "Enum"},
- _jsii_.MemberMethod{JsiiMethod: "extends", GoMethod: "Extends"},
- _jsii_.MemberMethod{JsiiMethod: "false", GoMethod: "False"},
- _jsii_.MemberMethod{JsiiMethod: "final", GoMethod: "Final"},
- _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"},
- _jsii_.MemberMethod{JsiiMethod: "float", GoMethod: "Float"},
- _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"},
- _jsii_.MemberMethod{JsiiMethod: "goto", GoMethod: "Goto"},
- _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"},
- _jsii_.MemberMethod{JsiiMethod: "implements", GoMethod: "Implements"},
- _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"},
- _jsii_.MemberMethod{JsiiMethod: "instanceof", GoMethod: "Instanceof"},
- _jsii_.MemberMethod{JsiiMethod: "int", GoMethod: "Int"},
- _jsii_.MemberMethod{JsiiMethod: "interface", GoMethod: "Interface"},
- _jsii_.MemberMethod{JsiiMethod: "long", GoMethod: "Long"},
- _jsii_.MemberMethod{JsiiMethod: "native", GoMethod: "Native"},
- _jsii_.MemberMethod{JsiiMethod: "new", GoMethod: "New"},
- _jsii_.MemberMethod{JsiiMethod: "null", GoMethod: "Null"},
- _jsii_.MemberMethod{JsiiMethod: "package", GoMethod: "Package"},
- _jsii_.MemberMethod{JsiiMethod: "private", GoMethod: "Private"},
- _jsii_.MemberMethod{JsiiMethod: "protected", GoMethod: "Protected"},
- _jsii_.MemberMethod{JsiiMethod: "public", GoMethod: "Public"},
- _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"},
- _jsii_.MemberMethod{JsiiMethod: "short", GoMethod: "Short"},
- _jsii_.MemberMethod{JsiiMethod: "static", GoMethod: "Static"},
- _jsii_.MemberMethod{JsiiMethod: "strictfp", GoMethod: "Strictfp"},
- _jsii_.MemberMethod{JsiiMethod: "super", GoMethod: "Super"},
- _jsii_.MemberMethod{JsiiMethod: "switch", GoMethod: "Switch"},
- _jsii_.MemberMethod{JsiiMethod: "synchronized", GoMethod: "Synchronized"},
- _jsii_.MemberMethod{JsiiMethod: "this", GoMethod: "This"},
- _jsii_.MemberMethod{JsiiMethod: "throw", GoMethod: "Throw"},
- _jsii_.MemberMethod{JsiiMethod: "throws", GoMethod: "Throws"},
- _jsii_.MemberMethod{JsiiMethod: "transient", GoMethod: "Transient"},
- _jsii_.MemberMethod{JsiiMethod: "true", GoMethod: "True"},
- _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"},
- _jsii_.MemberMethod{JsiiMethod: "void", GoMethod: "Void"},
- _jsii_.MemberMethod{JsiiMethod: "volatile", GoMethod: "Volatile"},
- _jsii_.MemberProperty{JsiiProperty: "while", GoGetter: "While"},
- },
- func() interface{} {
- return &jsiiProxy_JavaReservedWords{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Jsii487Derived",
- reflect.TypeOf((*Jsii487Derived)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- j := jsiiProxy_Jsii487Derived{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii487External2)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Jsii496Derived",
- reflect.TypeOf((*Jsii496Derived)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- j := jsiiProxy_Jsii496Derived{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IJsii496)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JsiiAgent",
- reflect.TypeOf((*JsiiAgent)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_JsiiAgent{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.JsonFormatter",
- reflect.TypeOf((*JsonFormatter)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_JsonFormatter{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.LevelOne",
- reflect.TypeOf((*LevelOne)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "props", GoGetter: "Props"},
- },
- func() interface{} {
- return &jsiiProxy_LevelOne{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.LevelOne.PropBooleanValue",
- reflect.TypeOf((*LevelOne_PropBooleanValue)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.LevelOne.PropProperty",
- reflect.TypeOf((*LevelOne_PropProperty)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.LevelOneProps",
- reflect.TypeOf((*LevelOneProps)(nil)).Elem(),
- )
- _jsii_.RegisterStruct(
- "jsii-calc.LoadBalancedFargateServiceProps",
- reflect.TypeOf((*LoadBalancedFargateServiceProps)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.MethodNamedProperty",
- reflect.TypeOf((*MethodNamedProperty)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "elite", GoGetter: "Elite"},
- _jsii_.MemberMethod{JsiiMethod: "property", GoMethod: "Property"},
- },
- func() interface{} {
- return &jsiiProxy_MethodNamedProperty{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Multiply",
- reflect.TypeOf((*Multiply)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"},
- _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"},
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberProperty{JsiiProperty: "lhs", GoGetter: "Lhs"},
- _jsii_.MemberMethod{JsiiMethod: "next", GoMethod: "Next"},
- _jsii_.MemberProperty{JsiiProperty: "rhs", GoGetter: "Rhs"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_Multiply{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_BinaryOperation)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IRandomNumberGenerator)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Negate",
- reflect.TypeOf((*Negate)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "farewell", GoMethod: "Farewell"},
- _jsii_.MemberMethod{JsiiMethod: "goodbye", GoMethod: "Goodbye"},
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- _jsii_.MemberProperty{JsiiProperty: "operand", GoGetter: "Operand"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_Negate{}
- _jsii_.InitJsiiProxy(&j.jsiiProxy_UnaryOperation)
- _jsii_.InitJsiiProxy(&j.jsiiProxy_IFriendlier)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.NestedClassInstance",
- reflect.TypeOf((*NestedClassInstance)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_NestedClassInstance{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.NestedStruct",
- reflect.TypeOf((*NestedStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.NodeStandardLibrary",
- reflect.TypeOf((*NodeStandardLibrary)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "cryptoSha256", GoMethod: "CryptoSha256"},
- _jsii_.MemberMethod{JsiiMethod: "fsReadFile", GoMethod: "FsReadFile"},
- _jsii_.MemberMethod{JsiiMethod: "fsReadFileSync", GoMethod: "FsReadFileSync"},
- _jsii_.MemberProperty{JsiiProperty: "osPlatform", GoGetter: "OsPlatform"},
- },
- func() interface{} {
- return &jsiiProxy_NodeStandardLibrary{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.NullShouldBeTreatedAsUndefined",
- reflect.TypeOf((*NullShouldBeTreatedAsUndefined)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "changeMeToUndefined", GoGetter: "ChangeMeToUndefined"},
- _jsii_.MemberMethod{JsiiMethod: "giveMeUndefined", GoMethod: "GiveMeUndefined"},
- _jsii_.MemberMethod{JsiiMethod: "giveMeUndefinedInsideAnObject", GoMethod: "GiveMeUndefinedInsideAnObject"},
- _jsii_.MemberMethod{JsiiMethod: "verifyPropertyIsUndefined", GoMethod: "VerifyPropertyIsUndefined"},
- },
- func() interface{} {
- return &jsiiProxy_NullShouldBeTreatedAsUndefined{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.NullShouldBeTreatedAsUndefinedData",
- reflect.TypeOf((*NullShouldBeTreatedAsUndefinedData)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.NumberGenerator",
- reflect.TypeOf((*NumberGenerator)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "generator", GoGetter: "Generator"},
- _jsii_.MemberMethod{JsiiMethod: "isSameGenerator", GoMethod: "IsSameGenerator"},
- _jsii_.MemberMethod{JsiiMethod: "nextTimes100", GoMethod: "NextTimes100"},
- },
- func() interface{} {
- return &jsiiProxy_NumberGenerator{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ObjectRefsInCollections",
- reflect.TypeOf((*ObjectRefsInCollections)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "sumFromArray", GoMethod: "SumFromArray"},
- _jsii_.MemberMethod{JsiiMethod: "sumFromMap", GoMethod: "SumFromMap"},
- },
- func() interface{} {
- return &jsiiProxy_ObjectRefsInCollections{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ObjectWithPropertyProvider",
- reflect.TypeOf((*ObjectWithPropertyProvider)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_ObjectWithPropertyProvider{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Old",
- reflect.TypeOf((*Old)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "doAThing", GoMethod: "DoAThing"},
- },
- func() interface{} {
- return &jsiiProxy_Old{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.OptionalArgumentInvoker",
- reflect.TypeOf((*OptionalArgumentInvoker)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "invokeWithOptional", GoMethod: "InvokeWithOptional"},
- _jsii_.MemberMethod{JsiiMethod: "invokeWithoutOptional", GoMethod: "InvokeWithoutOptional"},
- },
- func() interface{} {
- return &jsiiProxy_OptionalArgumentInvoker{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.OptionalConstructorArgument",
- reflect.TypeOf((*OptionalConstructorArgument)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "arg1", GoGetter: "Arg1"},
- _jsii_.MemberProperty{JsiiProperty: "arg2", GoGetter: "Arg2"},
- _jsii_.MemberProperty{JsiiProperty: "arg3", GoGetter: "Arg3"},
- },
- func() interface{} {
- return &jsiiProxy_OptionalConstructorArgument{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.OptionalStruct",
- reflect.TypeOf((*OptionalStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.OptionalStructConsumer",
- reflect.TypeOf((*OptionalStructConsumer)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "fieldValue", GoGetter: "FieldValue"},
- _jsii_.MemberProperty{JsiiProperty: "parameterWasUndefined", GoGetter: "ParameterWasUndefined"},
- },
- func() interface{} {
- return &jsiiProxy_OptionalStructConsumer{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.OverridableProtectedMember",
- reflect.TypeOf((*OverridableProtectedMember)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "overrideMe", GoMethod: "OverrideMe"},
- _jsii_.MemberProperty{JsiiProperty: "overrideReadOnly", GoGetter: "OverrideReadOnly"},
- _jsii_.MemberProperty{JsiiProperty: "overrideReadWrite", GoGetter: "OverrideReadWrite"},
- _jsii_.MemberMethod{JsiiMethod: "switchModes", GoMethod: "SwitchModes"},
- _jsii_.MemberMethod{JsiiMethod: "valueFromProtected", GoMethod: "ValueFromProtected"},
- },
- func() interface{} {
- return &jsiiProxy_OverridableProtectedMember{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.OverrideReturnsObject",
- reflect.TypeOf((*OverrideReturnsObject)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "test", GoMethod: "Test"},
- },
- func() interface{} {
- return &jsiiProxy_OverrideReturnsObject{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ParamShadowsBuiltins",
- reflect.TypeOf((*ParamShadowsBuiltins)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_ParamShadowsBuiltins{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.ParamShadowsBuiltinsProps",
- reflect.TypeOf((*ParamShadowsBuiltinsProps)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.ParamShadowsScope",
- reflect.TypeOf((*ParamShadowsScope)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "useScope", GoMethod: "UseScope"},
- },
- func() interface{} {
- return &jsiiProxy_ParamShadowsScope{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.ParentStruct982",
- reflect.TypeOf((*ParentStruct982)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.PartiallyInitializedThisConsumer",
- reflect.TypeOf((*PartiallyInitializedThisConsumer)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "consumePartiallyInitializedThis", GoMethod: "ConsumePartiallyInitializedThis"},
- },
- func() interface{} {
- return &jsiiProxy_PartiallyInitializedThisConsumer{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Polymorphism",
- reflect.TypeOf((*Polymorphism)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "sayHello", GoMethod: "SayHello"},
- },
- func() interface{} {
- return &jsiiProxy_Polymorphism{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.Power",
- reflect.TypeOf((*Power)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "base", GoGetter: "Base"},
- _jsii_.MemberProperty{JsiiProperty: "decorationPostfixes", GoGetter: "DecorationPostfixes"},
- _jsii_.MemberProperty{JsiiProperty: "decorationPrefixes", GoGetter: "DecorationPrefixes"},
- _jsii_.MemberProperty{JsiiProperty: "expression", GoGetter: "Expression"},
- _jsii_.MemberProperty{JsiiProperty: "pow", GoGetter: "Pow"},
- _jsii_.MemberProperty{JsiiProperty: "stringStyle", GoGetter: "StringStyle"},
- _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"},
- _jsii_.MemberMethod{JsiiMethod: "typeName", GoMethod: "TypeName"},
- _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"},
- },
- func() interface{} {
- j := jsiiProxy_Power{}
- _jsii_.InitJsiiProxy(&j.Type__compositionCompositeOperation)
- return &j
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.PromiseNothing",
- reflect.TypeOf((*PromiseNothing)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "instancePromiseIt", GoMethod: "InstancePromiseIt"},
- },
- func() interface{} {
- return &jsiiProxy_PromiseNothing{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.PropertyNamedProperty",
- reflect.TypeOf((*PropertyNamedProperty)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "property", GoGetter: "Property"},
- _jsii_.MemberProperty{JsiiProperty: "yetAnoterOne", GoGetter: "YetAnoterOne"},
- },
- func() interface{} {
- return &jsiiProxy_PropertyNamedProperty{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.PublicClass",
- reflect.TypeOf((*PublicClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "hello", GoMethod: "Hello"},
- },
- func() interface{} {
- return &jsiiProxy_PublicClass{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.PythonReservedWords",
- reflect.TypeOf((*PythonReservedWords)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "and", GoMethod: "And"},
- _jsii_.MemberMethod{JsiiMethod: "as", GoMethod: "As"},
- _jsii_.MemberMethod{JsiiMethod: "assert", GoMethod: "Assert"},
- _jsii_.MemberMethod{JsiiMethod: "async", GoMethod: "Async"},
- _jsii_.MemberMethod{JsiiMethod: "await", GoMethod: "Await"},
- _jsii_.MemberMethod{JsiiMethod: "break", GoMethod: "Break"},
- _jsii_.MemberMethod{JsiiMethod: "class", GoMethod: "Class"},
- _jsii_.MemberMethod{JsiiMethod: "continue", GoMethod: "Continue"},
- _jsii_.MemberMethod{JsiiMethod: "def", GoMethod: "Def"},
- _jsii_.MemberMethod{JsiiMethod: "del", GoMethod: "Del"},
- _jsii_.MemberMethod{JsiiMethod: "elif", GoMethod: "Elif"},
- _jsii_.MemberMethod{JsiiMethod: "else", GoMethod: "Else"},
- _jsii_.MemberMethod{JsiiMethod: "except", GoMethod: "Except"},
- _jsii_.MemberMethod{JsiiMethod: "finally", GoMethod: "Finally"},
- _jsii_.MemberMethod{JsiiMethod: "for", GoMethod: "For"},
- _jsii_.MemberMethod{JsiiMethod: "from", GoMethod: "From"},
- _jsii_.MemberMethod{JsiiMethod: "global", GoMethod: "Global"},
- _jsii_.MemberMethod{JsiiMethod: "if", GoMethod: "If"},
- _jsii_.MemberMethod{JsiiMethod: "import", GoMethod: "Import"},
- _jsii_.MemberMethod{JsiiMethod: "in", GoMethod: "In"},
- _jsii_.MemberMethod{JsiiMethod: "is", GoMethod: "Is"},
- _jsii_.MemberMethod{JsiiMethod: "lambda", GoMethod: "Lambda"},
- _jsii_.MemberMethod{JsiiMethod: "nonlocal", GoMethod: "Nonlocal"},
- _jsii_.MemberMethod{JsiiMethod: "not", GoMethod: "Not"},
- _jsii_.MemberMethod{JsiiMethod: "or", GoMethod: "Or"},
- _jsii_.MemberMethod{JsiiMethod: "pass", GoMethod: "Pass"},
- _jsii_.MemberMethod{JsiiMethod: "raise", GoMethod: "Raise"},
- _jsii_.MemberMethod{JsiiMethod: "return", GoMethod: "Return"},
- _jsii_.MemberMethod{JsiiMethod: "try", GoMethod: "Try"},
- _jsii_.MemberMethod{JsiiMethod: "while", GoMethod: "While"},
- _jsii_.MemberMethod{JsiiMethod: "with", GoMethod: "With"},
- _jsii_.MemberMethod{JsiiMethod: "yield", GoMethod: "Yield"},
- },
- func() interface{} {
- return &jsiiProxy_PythonReservedWords{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ReferenceEnumFromScopedPackage",
- reflect.TypeOf((*ReferenceEnumFromScopedPackage)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "foo", GoGetter: "Foo"},
- _jsii_.MemberMethod{JsiiMethod: "loadFoo", GoMethod: "LoadFoo"},
- _jsii_.MemberMethod{JsiiMethod: "saveFoo", GoMethod: "SaveFoo"},
- },
- func() interface{} {
- return &jsiiProxy_ReferenceEnumFromScopedPackage{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.ReturnsPrivateImplementationOfInterface",
- reflect.TypeOf((*ReturnsPrivateImplementationOfInterface)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberProperty{JsiiProperty: "privateImplementation", GoGetter: "PrivateImplementation"},
- },
- func() interface{} {
- return &jsiiProxy_ReturnsPrivateImplementationOfInterface{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.RootStruct",
- reflect.TypeOf((*RootStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.RootStructValidator",
- reflect.TypeOf((*RootStructValidator)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_RootStructValidator{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.RuntimeTypeChecking",
- reflect.TypeOf((*RuntimeTypeChecking)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "methodWithDefaultedArguments", GoMethod: "MethodWithDefaultedArguments"},
- _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalAnyArgument", GoMethod: "MethodWithOptionalAnyArgument"},
- _jsii_.MemberMethod{JsiiMethod: "methodWithOptionalArguments", GoMethod: "MethodWithOptionalArguments"},
- },
- func() interface{} {
- return &jsiiProxy_RuntimeTypeChecking{}
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.SecondLevelStruct",
- reflect.TypeOf((*SecondLevelStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.SingleInstanceTwoTypes",
- reflect.TypeOf((*SingleInstanceTwoTypes)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "interface1", GoMethod: "Interface1"},
- _jsii_.MemberMethod{JsiiMethod: "interface2", GoMethod: "Interface2"},
- },
- func() interface{} {
- return &jsiiProxy_SingleInstanceTwoTypes{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.SingletonInt",
- reflect.TypeOf((*SingletonInt)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "isSingletonInt", GoMethod: "IsSingletonInt"},
- },
- func() interface{} {
- return &jsiiProxy_SingletonInt{}
- },
- )
- _jsii_.RegisterEnum(
- "jsii-calc.SingletonIntEnum",
- reflect.TypeOf((*SingletonIntEnum)(nil)).Elem(),
- map[string]interface{}{
- "SINGLETON_INT": SingletonIntEnum_SINGLETON_INT,
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.SingletonString",
- reflect.TypeOf((*SingletonString)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "isSingletonString", GoMethod: "IsSingletonString"},
- },
- func() interface{} {
- return &jsiiProxy_SingletonString{}
- },
- )
- _jsii_.RegisterEnum(
- "jsii-calc.SingletonStringEnum",
- reflect.TypeOf((*SingletonStringEnum)(nil)).Elem(),
- map[string]interface{}{
- "SINGLETON_STRING": SingletonStringEnum_SINGLETON_STRING,
- },
- )
- _jsii_.RegisterStruct(
- "jsii-calc.SmellyStruct",
- reflect.TypeOf((*SmellyStruct)(nil)).Elem(),
- )
- _jsii_.RegisterClass(
- "jsii-calc.SomeTypeJsii976",
- reflect.TypeOf((*SomeTypeJsii976)(nil)).Elem(),
- nil, // no members
- func() interface{} {
- return &jsiiProxy_SomeTypeJsii976{}
- },
- )
- _jsii_.RegisterClass(
- "jsii-calc.StableClass",
- reflect.TypeOf((*StableClass)(nil)).Elem(),
- []_jsii_.Member{
- _jsii_.MemberMethod{JsiiMethod: "method", GoMethod: "Method"},
- _jsii_.MemberProperty{JsiiProperty: "mutableProperty", GoGetter: "MutableProperty"},
- _jsii_.MemberProperty{JsiiProperty: "readonlyProperty", GoGetter: "ReadonlyProperty"},
- },
- func() interface{} {
- return &jsiiProxy_StableClass{}
- },
+
+ return returns
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc": /go/jsiicalc/ContainerProps.go 1`] = `
+// A simple calcuator built on JSII.
+package jsiicalc
+
+
+type ContainerProps struct {
+ ArrayProp *[]*DummyObj \`field:"required" json:"arrayProp" yaml:"arrayProp"\`
+ ObjProp *map[string]*DummyObj \`field:"required" json:"objProp" yaml:"objProp"\`
+ RecordProp *map[string]*DummyObj \`field:"required" json:"recordProp" yaml:"recordProp"\`
+}
+
+
+`;
+
+exports[`Generated code for "jsii-calc":