/java/src/main/java/software/amazon/jsii/tests/calculator/Default.java 1`] = `
+package software.amazon.jsii.tests.calculator;
+
+/**
+ * A class named "Default".
+ *
+ * @see https://github.com/aws/jsii/issues/2637
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.Default")
+public class Default extends software.amazon.jsii.JsiiObject {
+
+ protected Default(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ }
+
+ protected Default(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
+ super(initializationMode);
+ }
+
+ /**
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Default() {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
+ }
+
+ /**
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public void pleaseCompile() {
+ software.amazon.jsii.Kernel.call(this, "pleaseCompile", software.amazon.jsii.NativeType.VOID);
+ }
+}
+
+`;
+
exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/DefaultedConstructorArgument.java 1`] = `
package software.amazon.jsii.tests.calculator;
@@ -13488,6 +13533,70 @@ public abstract class Isomorphism extends software.amazon.jsii.JsiiObject {
`;
+exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/Issue2638.java 1`] = `
+package software.amazon.jsii.tests.calculator;
+
+/**
+ * Docstrings with period.
+ *
+ * @see https://github.com/aws/jsii/issues/2638
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.Issue2638")
+public class Issue2638 extends software.amazon.jsii.JsiiObject {
+
+ protected Issue2638(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ }
+
+ protected Issue2638(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
+ super(initializationMode);
+ }
+
+ /**
+ * First sentence.
+ *
+ * Second sentence. Third sentence.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Issue2638() {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
+ }
+}
+
+`;
+
+exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/Issue2638B.java 1`] = `
+package software.amazon.jsii.tests.calculator;
+
+/**
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.Issue2638B")
+public class Issue2638B extends software.amazon.jsii.JsiiObject {
+
+ protected Issue2638B(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ }
+
+ protected Issue2638B(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
+ super(initializationMode);
+ }
+
+ /**
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Issue2638B() {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
+ }
+}
+
+`;
+
exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/JSII417Derived.java 1`] = `
package software.amazon.jsii.tests.calculator;
@@ -19013,6 +19122,163 @@ public class StructUnionConsumer extends software.amazon.jsii.JsiiObject {
`;
+exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/StructWithEnum.java 1`] = `
+package software.amazon.jsii.tests.calculator;
+
+/**
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.StructWithEnum")
+@software.amazon.jsii.Jsii.Proxy(StructWithEnum.Jsii$Proxy.class)
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+public interface StructWithEnum extends software.amazon.jsii.JsiiSerializable {
+
+ /**
+ * An enum value.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StringEnum getFoo();
+
+ /**
+ * Optional enum value (of type integer).
+ *
+ * Default: AllTypesEnum.YOUR_ENUM_VALUE
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ default @org.jetbrains.annotations.Nullable software.amazon.jsii.tests.calculator.AllTypesEnum getBar() {
+ return null;
+ }
+
+ /**
+ * @return a {@link Builder} of {@link StructWithEnum}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ static Builder builder() {
+ return new Builder();
+ }
+ /**
+ * A builder for {@link StructWithEnum}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public static final class Builder implements software.amazon.jsii.Builder {
+ private software.amazon.jsii.tests.calculator.StringEnum foo;
+ private software.amazon.jsii.tests.calculator.AllTypesEnum bar;
+
+ /**
+ * Sets the value of {@link StructWithEnum#getFoo}
+ * @param foo An enum value. This parameter is required.
+ * @return {@code this}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Builder foo(software.amazon.jsii.tests.calculator.StringEnum foo) {
+ this.foo = foo;
+ return this;
+ }
+
+ /**
+ * Sets the value of {@link StructWithEnum#getBar}
+ * @param bar Optional enum value (of type integer).
+ * @return {@code this}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Builder bar(software.amazon.jsii.tests.calculator.AllTypesEnum bar) {
+ this.bar = bar;
+ return this;
+ }
+
+ /**
+ * Builds the configured instance.
+ * @return a new instance of {@link StructWithEnum}
+ * @throws NullPointerException if any required attribute was not provided
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @Override
+ public StructWithEnum build() {
+ return new Jsii$Proxy(foo, bar);
+ }
+ }
+
+ /**
+ * An implementation for {@link StructWithEnum}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @software.amazon.jsii.Internal
+ final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StructWithEnum {
+ private final software.amazon.jsii.tests.calculator.StringEnum foo;
+ private final software.amazon.jsii.tests.calculator.AllTypesEnum bar;
+
+ /**
+ * Constructor that initializes the object based on values retrieved from the JsiiObject.
+ * @param objRef Reference to the JSII managed object.
+ */
+ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StringEnum.class));
+ this.bar = software.amazon.jsii.Kernel.get(this, "bar", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.AllTypesEnum.class));
+ }
+
+ /**
+ * Constructor that initializes the object based on literal property values passed by the {@link Builder}.
+ */
+ protected Jsii$Proxy(final software.amazon.jsii.tests.calculator.StringEnum foo, final software.amazon.jsii.tests.calculator.AllTypesEnum bar) {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ this.foo = java.util.Objects.requireNonNull(foo, "foo is required");
+ this.bar = bar;
+ }
+
+ @Override
+ public final software.amazon.jsii.tests.calculator.StringEnum getFoo() {
+ return this.foo;
+ }
+
+ @Override
+ public final software.amazon.jsii.tests.calculator.AllTypesEnum getBar() {
+ return this.bar;
+ }
+
+ @Override
+ @software.amazon.jsii.Internal
+ public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
+ final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
+ final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+
+ data.set("foo", om.valueToTree(this.getFoo()));
+ if (this.getBar() != null) {
+ data.set("bar", om.valueToTree(this.getBar()));
+ }
+
+ final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+ struct.set("fqn", om.valueToTree("jsii-calc.StructWithEnum"));
+ struct.set("data", data);
+
+ final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+ obj.set("$jsii.struct", struct);
+
+ return obj;
+ }
+
+ @Override
+ public final boolean equals(final Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ StructWithEnum.Jsii$Proxy that = (StructWithEnum.Jsii$Proxy) o;
+
+ if (!foo.equals(that.foo)) return false;
+ return this.bar != null ? this.bar.equals(that.bar) : that.bar == null;
+ }
+
+ @Override
+ public final int hashCode() {
+ int result = this.foo.hashCode();
+ result = 31 * result + (this.bar != null ? this.bar.hashCode() : 0);
+ return result;
+ }
+ }
+}
+
+`;
+
exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/StructWithJavaReservedWords.java 1`] = `
package software.amazon.jsii.tests.calculator;
@@ -19872,6 +20138,71 @@ public class SyncVirtualMethods extends software.amazon.jsii.JsiiObject {
`;
+exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/TestStructWithEnum.java 1`] = `
+package software.amazon.jsii.tests.calculator;
+
+/**
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.TestStructWithEnum")
+public class TestStructWithEnum extends software.amazon.jsii.JsiiObject {
+
+ protected TestStructWithEnum(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ }
+
+ protected TestStructWithEnum(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
+ super(initializationMode);
+ }
+
+ /**
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public TestStructWithEnum() {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
+ }
+
+ /**
+ * Returns true if \`foo\` is \`StringEnum.A\`.
+ *
+ * @param input This parameter is required.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public @org.jetbrains.annotations.NotNull java.lang.Boolean isStringEnumA(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum input) {
+ return software.amazon.jsii.Kernel.call(this, "isStringEnumA", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(input, "input is required") });
+ }
+
+ /**
+ * Returns true if \`foo\` is \`StringEnum.B\` and \`bar\` is \`AllTypesEnum.THIS_IS_GREAT\`.
+ *
+ * @param input This parameter is required.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public @org.jetbrains.annotations.NotNull java.lang.Boolean isStringEnumB(final @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum input) {
+ return software.amazon.jsii.Kernel.call(this, "isStringEnumB", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class), new Object[] { java.util.Objects.requireNonNull(input, "input is required") });
+ }
+
+ /**
+ * Returns \`foo: StringEnum.A\`.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum getStructWithFoo() {
+ return software.amazon.jsii.Kernel.get(this, "structWithFoo", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructWithEnum.class));
+ }
+
+ /**
+ * Returns \`foo: StringEnum.C\` and \`bar: AllTypesEnum.MY_ENUM_VALUE\`.
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public @org.jetbrains.annotations.NotNull software.amazon.jsii.tests.calculator.StructWithEnum getStructWithFooBar() {
+ return software.amazon.jsii.Kernel.get(this, "structWithFooBar", software.amazon.jsii.NativeType.forClass(software.amazon.jsii.tests.calculator.StructWithEnum.class));
+ }
+}
+
+`;
+
exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/Thrower.java 1`] = `
package software.amazon.jsii.tests.calculator;
@@ -21766,6 +22097,130 @@ public interface StructWithSelf extends software.amazon.jsii.JsiiSerializable {
`;
+exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/submodule/Default.java 1`] = `
+package software.amazon.jsii.tests.calculator.submodule;
+
+/**
+ * A struct named "Default".
+ *
+ * @see https://github.com/aws/jsii/issues/2637
+ */
+@javax.annotation.Generated(value = "jsii-pacmak")
+@software.amazon.jsii.Jsii(module = software.amazon.jsii.tests.calculator.$Module.class, fqn = "jsii-calc.submodule.Default")
+@software.amazon.jsii.Jsii.Proxy(Default.Jsii$Proxy.class)
+@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+public interface Default extends software.amazon.jsii.JsiiSerializable {
+
+ /**
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @org.jetbrains.annotations.NotNull java.lang.Number getFoo();
+
+ /**
+ * @return a {@link Builder} of {@link Default}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ static Builder builder() {
+ return new Builder();
+ }
+ /**
+ * A builder for {@link Default}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public static final class Builder implements software.amazon.jsii.Builder {
+ private java.lang.Number foo;
+
+ /**
+ * Sets the value of {@link Default#getFoo}
+ * @param foo the value to be set. This parameter is required.
+ * @return {@code this}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ public Builder foo(java.lang.Number foo) {
+ this.foo = foo;
+ return this;
+ }
+
+ /**
+ * Builds the configured instance.
+ * @return a new instance of {@link Default}
+ * @throws NullPointerException if any required attribute was not provided
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @Override
+ public Default build() {
+ return new Jsii$Proxy(foo);
+ }
+ }
+
+ /**
+ * An implementation for {@link Default}
+ */
+ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
+ @software.amazon.jsii.Internal
+ final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements Default {
+ private final java.lang.Number foo;
+
+ /**
+ * Constructor that initializes the object based on values retrieved from the JsiiObject.
+ * @param objRef Reference to the JSII managed object.
+ */
+ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
+ super(objRef);
+ this.foo = software.amazon.jsii.Kernel.get(this, "foo", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
+ }
+
+ /**
+ * Constructor that initializes the object based on literal property values passed by the {@link Builder}.
+ */
+ protected Jsii$Proxy(final java.lang.Number foo) {
+ super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
+ this.foo = java.util.Objects.requireNonNull(foo, "foo is required");
+ }
+
+ @Override
+ public final java.lang.Number getFoo() {
+ return this.foo;
+ }
+
+ @Override
+ @software.amazon.jsii.Internal
+ public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
+ final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
+ final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+
+ data.set("foo", om.valueToTree(this.getFoo()));
+
+ final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+ struct.set("fqn", om.valueToTree("jsii-calc.submodule.Default"));
+ struct.set("data", data);
+
+ final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
+ obj.set("$jsii.struct", struct);
+
+ return obj;
+ }
+
+ @Override
+ public final boolean equals(final Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ Default.Jsii$Proxy that = (Default.Jsii$Proxy) o;
+
+ return this.foo.equals(that.foo);
+ }
+
+ @Override
+ public final int hashCode() {
+ int result = this.foo.hashCode();
+ return result;
+ }
+ }
+}
+
+`;
+
exports[`Generated code for "jsii-calc": /java/src/main/java/software/amazon/jsii/tests/calculator/submodule/MyClass.java 1`] = `
package software.amazon.jsii.tests.calculator.submodule;
@@ -22872,6 +23327,7 @@ jsii-calc.ConsumePureInterface=software.amazon.jsii.tests.calculator.ConsumePure
jsii-calc.ConsumerCanRingBell=software.amazon.jsii.tests.calculator.ConsumerCanRingBell
jsii-calc.ConsumersOfThisCrazyTypeSystem=software.amazon.jsii.tests.calculator.ConsumersOfThisCrazyTypeSystem
jsii-calc.DataRenderer=software.amazon.jsii.tests.calculator.DataRenderer
+jsii-calc.Default=software.amazon.jsii.tests.calculator.Default
jsii-calc.DefaultedConstructorArgument=software.amazon.jsii.tests.calculator.DefaultedConstructorArgument
jsii-calc.Demonstrate982=software.amazon.jsii.tests.calculator.Demonstrate982
jsii-calc.DeprecatedClass=software.amazon.jsii.tests.calculator.DeprecatedClass
@@ -22958,6 +23414,8 @@ jsii-calc.InterfaceInNamespaceIncludesClasses.Hello=software.amazon.jsii.tests.c
jsii-calc.InterfaceInNamespaceOnlyInterface.Hello=software.amazon.jsii.tests.calculator.interface_in_namespace_only_interface.Hello
jsii-calc.InterfacesMaker=software.amazon.jsii.tests.calculator.InterfacesMaker
jsii-calc.Isomorphism=software.amazon.jsii.tests.calculator.Isomorphism
+jsii-calc.Issue2638=software.amazon.jsii.tests.calculator.Issue2638
+jsii-calc.Issue2638B=software.amazon.jsii.tests.calculator.Issue2638B
jsii-calc.JSII417Derived=software.amazon.jsii.tests.calculator.JSII417Derived
jsii-calc.JSII417PublicBaseOfBase=software.amazon.jsii.tests.calculator.JSII417PublicBaseOfBase
jsii-calc.JSObjectLiteralForInterface=software.amazon.jsii.tests.calculator.JSObjectLiteralForInterface
@@ -23029,12 +23487,14 @@ jsii-calc.StructB=software.amazon.jsii.tests.calculator.StructB
jsii-calc.StructParameterType=software.amazon.jsii.tests.calculator.StructParameterType
jsii-calc.StructPassing=software.amazon.jsii.tests.calculator.StructPassing
jsii-calc.StructUnionConsumer=software.amazon.jsii.tests.calculator.StructUnionConsumer
+jsii-calc.StructWithEnum=software.amazon.jsii.tests.calculator.StructWithEnum
jsii-calc.StructWithJavaReservedWords=software.amazon.jsii.tests.calculator.StructWithJavaReservedWords
jsii-calc.Sum=software.amazon.jsii.tests.calculator.Sum
jsii-calc.SupportsNiceJavaBuilder=software.amazon.jsii.tests.calculator.SupportsNiceJavaBuilder
jsii-calc.SupportsNiceJavaBuilderProps=software.amazon.jsii.tests.calculator.SupportsNiceJavaBuilderProps
jsii-calc.SupportsNiceJavaBuilderWithRequiredProps=software.amazon.jsii.tests.calculator.SupportsNiceJavaBuilderWithRequiredProps
jsii-calc.SyncVirtualMethods=software.amazon.jsii.tests.calculator.SyncVirtualMethods
+jsii-calc.TestStructWithEnum=software.amazon.jsii.tests.calculator.TestStructWithEnum
jsii-calc.Thrower=software.amazon.jsii.tests.calculator.Thrower
jsii-calc.TopLevelStruct=software.amazon.jsii.tests.calculator.TopLevelStruct
jsii-calc.UmaskCheck=software.amazon.jsii.tests.calculator.UmaskCheck
@@ -23054,6 +23514,7 @@ jsii-calc.composition.CompositeOperation.CompositionStringStyle=software.amazon.
jsii-calc.nodirect.sub1.TypeFromSub1=software.amazon.jsii.tests.calculator.nodirect.sub1.TypeFromSub1
jsii-calc.nodirect.sub2.TypeFromSub2=software.amazon.jsii.tests.calculator.nodirect.sub2.TypeFromSub2
jsii-calc.onlystatic.OnlyStaticMethods=software.amazon.jsii.tests.calculator.onlystatic.OnlyStaticMethods
+jsii-calc.submodule.Default=software.amazon.jsii.tests.calculator.submodule.Default
jsii-calc.submodule.MyClass=software.amazon.jsii.tests.calculator.submodule.MyClass
jsii-calc.submodule.back_references.MyClassReference=software.amazon.jsii.tests.calculator.submodule.back_references.MyClassReference
jsii-calc.submodule.child.Awesomeness=software.amazon.jsii.tests.calculator.submodule.child.Awesomeness
diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap
index 5771ea5b69..6f302ae5a9 100644
--- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap
+++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap
@@ -3659,6 +3659,20 @@ class DataRenderer(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.DataRenderer"):
return typing.cast(builtins.str, jsii.invoke(self, "renderMap", [map]))
+class Default(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Default"):
+ '''A class named "Default".
+
+ :see: https://github.com/aws/jsii/issues/2637
+ '''
+
+ def __init__(self) -> None:
+ jsii.create(Default, self, [])
+
+ @jsii.member(jsii_name="pleaseCompile")
+ def please_compile(self) -> None:
+ return typing.cast(None, jsii.invoke(self, "pleaseCompile", []))
+
+
class DefaultedConstructorArgument(
metaclass=jsii.JSIIMeta,
jsii_type="jsii-calc.DefaultedConstructorArgument",
@@ -6246,6 +6260,25 @@ class _IsomorphismProxy(Isomorphism):
pass
+class Issue2638(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Issue2638"):
+ '''Docstrings with period.
+
+ :see: https://github.com/aws/jsii/issues/2638
+ '''
+
+ def __init__(self) -> None:
+ '''First sentence.
+
+ Second sentence. Third sentence.
+ '''
+ jsii.create(Issue2638, self, [])
+
+
+class Issue2638B(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Issue2638B"):
+ def __init__(self) -> None:
+ jsii.create(Issue2638B, self, [])
+
+
class JSII417PublicBaseOfBase(
metaclass=jsii.JSIIMeta,
jsii_type="jsii-calc.JSII417PublicBaseOfBase",
@@ -8475,6 +8508,56 @@ class StructUnionConsumer(
return typing.cast(builtins.bool, jsii.sinvoke(cls, "isStructB", [struct]))
+@jsii.data_type(
+ jsii_type="jsii-calc.StructWithEnum",
+ jsii_struct_bases=[],
+ name_mapping={"foo": "foo", "bar": "bar"},
+)
+class StructWithEnum:
+ def __init__(
+ self,
+ *,
+ foo: StringEnum,
+ bar: typing.Optional[AllTypesEnum] = None,
+ ) -> None:
+ '''
+ :param foo: An enum value.
+ :param bar: Optional enum value (of type integer). Default: AllTypesEnum.YOUR_ENUM_VALUE
+ '''
+ self._values: typing.Dict[str, typing.Any] = {
+ "foo": foo,
+ }
+ if bar is not None:
+ self._values["bar"] = bar
+
+ @builtins.property
+ def foo(self) -> StringEnum:
+ '''An enum value.'''
+ result = self._values.get("foo")
+ assert result is not None, "Required property 'foo' is missing"
+ return typing.cast(StringEnum, result)
+
+ @builtins.property
+ def bar(self) -> typing.Optional[AllTypesEnum]:
+ '''Optional enum value (of type integer).
+
+ :default: AllTypesEnum.YOUR_ENUM_VALUE
+ '''
+ result = self._values.get("bar")
+ return typing.cast(typing.Optional[AllTypesEnum], result)
+
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
+
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
+ return not (rhs == self)
+
+ def __repr__(self) -> str:
+ return "StructWithEnum(%s)" % ", ".join(
+ k + "=" + repr(v) for k, v in self._values.items()
+ )
+
+
@jsii.data_type(
jsii_type="jsii-calc.StructWithJavaReservedWords",
jsii_struct_bases=[],
@@ -8772,6 +8855,58 @@ class SyncVirtualMethods(
jsii.set(self, "valueOfOtherProperty", value)
+class TestStructWithEnum(
+ metaclass=jsii.JSIIMeta,
+ jsii_type="jsii-calc.TestStructWithEnum",
+):
+ def __init__(self) -> None:
+ jsii.create(TestStructWithEnum, self, [])
+
+ @jsii.member(jsii_name="isStringEnumA")
+ def is_string_enum_a(
+ self,
+ *,
+ foo: StringEnum,
+ bar: typing.Optional[AllTypesEnum] = None,
+ ) -> builtins.bool:
+ '''Returns true if \`\`foo\`\` is \`\`StringEnum.A\`\`.
+
+ :param foo: An enum value.
+ :param bar: Optional enum value (of type integer). Default: AllTypesEnum.YOUR_ENUM_VALUE
+ '''
+ input = StructWithEnum(foo=foo, bar=bar)
+
+ return typing.cast(builtins.bool, jsii.invoke(self, "isStringEnumA", [input]))
+
+ @jsii.member(jsii_name="isStringEnumB")
+ def is_string_enum_b(
+ self,
+ *,
+ foo: StringEnum,
+ bar: typing.Optional[AllTypesEnum] = None,
+ ) -> builtins.bool:
+ '''Returns true if \`\`foo\`\` is \`\`StringEnum.B\`\` and \`\`bar\`\` is \`\`AllTypesEnum.THIS_IS_GREAT\`\`.
+
+ :param foo: An enum value.
+ :param bar: Optional enum value (of type integer). Default: AllTypesEnum.YOUR_ENUM_VALUE
+ '''
+ input = StructWithEnum(foo=foo, bar=bar)
+
+ return typing.cast(builtins.bool, jsii.invoke(self, "isStringEnumB", [input]))
+
+ @builtins.property # type: ignore[misc]
+ @jsii.member(jsii_name="structWithFoo")
+ def struct_with_foo(self) -> StructWithEnum:
+ '''Returns \`\`foo: StringEnum.A\`\`.'''
+ return typing.cast(StructWithEnum, jsii.get(self, "structWithFoo"))
+
+ @builtins.property # type: ignore[misc]
+ @jsii.member(jsii_name="structWithFooBar")
+ def struct_with_foo_bar(self) -> StructWithEnum:
+ '''Returns \`\`foo: StringEnum.C\`\` and \`\`bar: AllTypesEnum.MY_ENUM_VALUE\`\`.'''
+ return typing.cast(StructWithEnum, jsii.get(self, "structWithFooBar"))
+
+
class Thrower(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.Thrower"):
def __init__(self) -> None:
jsii.create(Thrower, self, [])
@@ -9683,6 +9818,7 @@ __all__ = [
"ConsumerCanRingBell",
"ConsumersOfThisCrazyTypeSystem",
"DataRenderer",
+ "Default",
"DefaultedConstructorArgument",
"Demonstrate982",
"DeprecatedClass",
@@ -9764,6 +9900,8 @@ __all__ = [
"InterfaceCollections",
"InterfacesMaker",
"Isomorphism",
+ "Issue2638",
+ "Issue2638B",
"JSII417Derived",
"JSII417PublicBaseOfBase",
"JSObjectLiteralForInterface",
@@ -9829,12 +9967,14 @@ __all__ = [
"StructParameterType",
"StructPassing",
"StructUnionConsumer",
+ "StructWithEnum",
"StructWithJavaReservedWords",
"Sum",
"SupportsNiceJavaBuilder",
"SupportsNiceJavaBuilderProps",
"SupportsNiceJavaBuilderWithRequiredProps",
"SyncVirtualMethods",
+ "TestStructWithEnum",
"Thrower",
"TopLevelStruct",
"UmaskCheck",
@@ -10459,6 +10599,41 @@ from .nested_submodule.deeply_nested import INamespaced as _INamespaced_e2f386ad
from .param import SpecialParameter as _SpecialParameter_5bbf34a2
+@jsii.data_type(
+ jsii_type="jsii-calc.submodule.Default",
+ jsii_struct_bases=[],
+ name_mapping={"foo": "foo"},
+)
+class Default:
+ def __init__(self, *, foo: jsii.Number) -> None:
+ '''A struct named "Default".
+
+ :param foo:
+
+ :see: https://github.com/aws/jsii/issues/2637
+ '''
+ self._values: typing.Dict[str, typing.Any] = {
+ "foo": foo,
+ }
+
+ @builtins.property
+ def foo(self) -> jsii.Number:
+ result = self._values.get("foo")
+ assert result is not None, "Required property 'foo' is missing"
+ return typing.cast(jsii.Number, result)
+
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
+
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
+ return not (rhs == self)
+
+ def __repr__(self) -> str:
+ return "Default(%s)" % ", ".join(
+ k + "=" + repr(v) for k, v in self._values.items()
+ )
+
+
@jsii.implements(_INamespaced_e2f386ad)
class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"):
def __init__(self, *, prop: _SomeEnum_b2e41d92) -> None:
@@ -10509,6 +10684,7 @@ class MyClass(metaclass=jsii.JSIIMeta, jsii_type="jsii-calc.submodule.MyClass"):
__all__ = [
+ "Default",
"MyClass",
]
diff --git a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap
index ef44e72781..415a3c44c6 100644
--- a/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap
+++ b/packages/jsii-reflect/test/__snapshots__/jsii-tree.test.ts.snap
@@ -227,32 +227,38 @@ exports[`jsii-tree --all 1`] = `
│ │ │ └─┬ returnsSpecialParam() method (stable)
│ │ │ └── returns: jsii-calc.submodule.param.SpecialParameter
│ │ └─┬ types
- │ │ └─┬ class MyClass (stable)
- │ │ ├── interfaces: INamespaced
+ │ │ ├─┬ class MyClass (stable)
+ │ │ │ ├── interfaces: INamespaced
+ │ │ │ └─┬ members
+ │ │ │ ├─┬ (props) initializer (stable)
+ │ │ │ │ └─┬ parameters
+ │ │ │ │ └─┬ props
+ │ │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
+ │ │ │ ├─┬ methodWithSpecialParam(param) method (stable)
+ │ │ │ │ ├─┬ parameters
+ │ │ │ │ │ └─┬ param
+ │ │ │ │ │ └── type: jsii-calc.submodule.param.SpecialParameter
+ │ │ │ │ └── returns: string
+ │ │ │ ├─┬ awesomeness property (stable)
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.Awesomeness
+ │ │ │ ├─┬ definedAt property (stable)
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: string
+ │ │ │ ├─┬ goodness property (stable)
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.Goodness
+ │ │ │ ├─┬ props property (stable)
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
+ │ │ │ └─┬ allTypes property (stable)
+ │ │ │ └── type: Optional
+ │ │ └─┬ interface Default (stable)
│ │ └─┬ members
- │ │ ├─┬ (props) initializer (stable)
- │ │ │ └─┬ parameters
- │ │ │ └─┬ props
- │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
- │ │ ├─┬ methodWithSpecialParam(param) method (stable)
- │ │ │ ├─┬ parameters
- │ │ │ │ └─┬ param
- │ │ │ │ └── type: jsii-calc.submodule.param.SpecialParameter
- │ │ │ └── returns: string
- │ │ ├─┬ awesomeness property (stable)
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.Awesomeness
- │ │ ├─┬ definedAt property (stable)
- │ │ │ ├── immutable
- │ │ │ └── type: string
- │ │ ├─┬ goodness property (stable)
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.Goodness
- │ │ ├─┬ props property (stable)
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
- │ │ └─┬ allTypes property (stable)
- │ │ └── type: Optional
+ │ │ └─┬ foo property (stable)
+ │ │ ├── abstract
+ │ │ ├── immutable
+ │ │ └── type: number
│ └─┬ types
│ ├─┬ class AbstractClass (stable)
│ │ ├── base: AbstractClassBase
@@ -745,6 +751,11 @@ exports[`jsii-tree --all 1`] = `
│ │ │ └─┬ map
│ │ │ └── type: Map any>
│ │ └── returns: string
+ │ ├─┬ class Default (stable)
+ │ │ └─┬ members
+ │ │ ├── () initializer (stable)
+ │ │ └─┬ pleaseCompile() method (stable)
+ │ │ └── returns: void
│ ├─┬ class DefaultedConstructorArgument (stable)
│ │ └─┬ members
│ │ ├─┬ (arg1,arg2,arg3) initializer (stable)
@@ -1046,6 +1057,12 @@ exports[`jsii-tree --all 1`] = `
│ │ ├── () initializer (stable)
│ │ └─┬ myself() method (stable)
│ │ └── returns: jsii-calc.Isomorphism
+ │ ├─┬ class Issue2638 (stable)
+ │ │ └─┬ members
+ │ │ └── () initializer (stable)
+ │ ├─┬ class Issue2638B (stable)
+ │ │ └─┬ members
+ │ │ └── () initializer (stable)
│ ├─┬ class JSII417Derived (stable)
│ │ ├── base: JSII417PublicBaseOfBase
│ │ └─┬ members
@@ -1885,6 +1902,25 @@ exports[`jsii-tree --all 1`] = `
│ │ │ └── type: string
│ │ └─┬ valueOfOtherProperty property (stable)
│ │ └── type: string
+ │ ├─┬ class TestStructWithEnum (stable)
+ │ │ └─┬ members
+ │ │ ├── () initializer (stable)
+ │ │ ├─┬ isStringEnumA(input) method (stable)
+ │ │ │ ├─┬ parameters
+ │ │ │ │ └─┬ input
+ │ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ │ └── returns: boolean
+ │ │ ├─┬ isStringEnumB(input) method (stable)
+ │ │ │ ├─┬ parameters
+ │ │ │ │ └─┬ input
+ │ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ │ └── returns: boolean
+ │ │ ├─┬ structWithFoo property (stable)
+ │ │ │ ├── immutable
+ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ └─┬ structWithFooBar property (stable)
+ │ │ ├── immutable
+ │ │ └── type: jsii-calc.StructWithEnum
│ ├─┬ class Thrower (stable)
│ │ └─┬ members
│ │ ├── () initializer (stable)
@@ -2572,6 +2608,16 @@ exports[`jsii-tree --all 1`] = `
│ │ ├── abstract
│ │ ├── immutable
│ │ └── type: Optional
+ │ ├─┬ interface StructWithEnum (stable)
+ │ │ └─┬ members
+ │ │ ├─┬ foo property (stable)
+ │ │ │ ├── abstract
+ │ │ │ ├── immutable
+ │ │ │ └── type: jsii-calc.StringEnum
+ │ │ └─┬ bar property (stable)
+ │ │ ├── abstract
+ │ │ ├── immutable
+ │ │ └── type: Optional
│ ├─┬ interface StructWithJavaReservedWords (stable)
│ │ └─┬ members
│ │ ├─┬ default property (stable)
@@ -2934,8 +2980,9 @@ exports[`jsii-tree --inheritance 1`] = `
│ │ │ └─┬ types
│ │ │ └── class ReturnsSpecialParameter
│ │ └─┬ types
- │ │ └─┬ class MyClass
- │ │ └── interfaces: INamespaced
+ │ │ ├─┬ class MyClass
+ │ │ │ └── interfaces: INamespaced
+ │ │ └── interface Default
│ └─┬ types
│ ├─┬ class AbstractClass
│ │ ├── base: AbstractClassBase
@@ -2978,6 +3025,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── class ConsumerCanRingBell
│ ├── class ConsumersOfThisCrazyTypeSystem
│ ├── class DataRenderer
+ │ ├── class Default
│ ├── class DefaultedConstructorArgument
│ ├── class Demonstrate982
│ ├── class DeprecatedClass
@@ -3012,6 +3060,8 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── class InterfaceCollections
│ ├── class InterfacesMaker
│ ├── class Isomorphism
+ │ ├── class Issue2638
+ │ ├── class Issue2638B
│ ├─┬ class JSII417Derived
│ │ └── base: JSII417PublicBaseOfBase
│ ├── class JSII417PublicBaseOfBase
@@ -3075,6 +3125,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ │ └── base: SupportsNiceJavaBuilderWithRequiredProps
│ ├── class SupportsNiceJavaBuilderWithRequiredProps
│ ├── class SyncVirtualMethods
+ │ ├── class TestStructWithEnum
│ ├── class Thrower
│ ├── class UmaskCheck
│ ├─┬ class UnaryOperation
@@ -3186,6 +3237,7 @@ exports[`jsii-tree --inheritance 1`] = `
│ ├── interface StructA
│ ├── interface StructB
│ ├── interface StructParameterType
+ │ ├── interface StructWithEnum
│ ├── interface StructWithJavaReservedWords
│ ├── interface SupportsNiceJavaBuilderProps
│ ├── interface TopLevelStruct
@@ -3386,15 +3438,18 @@ exports[`jsii-tree --members 1`] = `
│ │ │ ├── () initializer
│ │ │ └── returnsSpecialParam() method
│ │ └─┬ types
- │ │ └─┬ class MyClass
+ │ │ ├─┬ class MyClass
+ │ │ │ └─┬ members
+ │ │ │ ├── (props) initializer
+ │ │ │ ├── methodWithSpecialParam(param) method
+ │ │ │ ├── awesomeness property
+ │ │ │ ├── definedAt property
+ │ │ │ ├── goodness property
+ │ │ │ ├── props property
+ │ │ │ └── allTypes property
+ │ │ └─┬ interface Default
│ │ └─┬ members
- │ │ ├── (props) initializer
- │ │ ├── methodWithSpecialParam(param) method
- │ │ ├── awesomeness property
- │ │ ├── definedAt property
- │ │ ├── goodness property
- │ │ ├── props property
- │ │ └── allTypes property
+ │ │ └── foo property
│ └─┬ types
│ ├─┬ class AbstractClass
│ │ └─┬ members
@@ -3596,6 +3651,10 @@ exports[`jsii-tree --members 1`] = `
│ │ ├── render(data) method
│ │ ├── renderArbitrary(data) method
│ │ └── renderMap(map) method
+ │ ├─┬ class Default
+ │ │ └─┬ members
+ │ │ ├── () initializer
+ │ │ └── pleaseCompile() method
│ ├─┬ class DefaultedConstructorArgument
│ │ └─┬ members
│ │ ├── (arg1,arg2,arg3) initializer
@@ -3729,6 +3788,12 @@ exports[`jsii-tree --members 1`] = `
│ │ └─┬ members
│ │ ├── () initializer
│ │ └── myself() method
+ │ ├─┬ class Issue2638
+ │ │ └─┬ members
+ │ │ └── () initializer
+ │ ├─┬ class Issue2638B
+ │ │ └─┬ members
+ │ │ └── () initializer
│ ├─┬ class JSII417Derived
│ │ └─┬ members
│ │ ├── (property) initializer
@@ -4097,6 +4162,13 @@ exports[`jsii-tree --members 1`] = `
│ │ ├── otherProperty property
│ │ ├── theProperty property
│ │ └── valueOfOtherProperty property
+ │ ├─┬ class TestStructWithEnum
+ │ │ └─┬ members
+ │ │ ├── () initializer
+ │ │ ├── isStringEnumA(input) method
+ │ │ ├── isStringEnumB(input) method
+ │ │ ├── structWithFoo property
+ │ │ └── structWithFooBar property
│ ├─┬ class Thrower
│ │ └─┬ members
│ │ ├── () initializer
@@ -4391,6 +4463,10 @@ exports[`jsii-tree --members 1`] = `
│ │ └─┬ members
│ │ ├── scope property
│ │ └── props property
+ │ ├─┬ interface StructWithEnum
+ │ │ └─┬ members
+ │ │ ├── foo property
+ │ │ └── bar property
│ ├─┬ interface StructWithJavaReservedWords
│ │ └─┬ members
│ │ ├── default property
@@ -4638,7 +4714,8 @@ exports[`jsii-tree --types 1`] = `
│ │ │ └─┬ types
│ │ │ └── class ReturnsSpecialParameter
│ │ └─┬ types
- │ │ └── class MyClass
+ │ │ ├── class MyClass
+ │ │ └── interface Default
│ └─┬ types
│ ├── class AbstractClass
│ ├── class AbstractClassBase
@@ -4670,6 +4747,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── class ConsumerCanRingBell
│ ├── class ConsumersOfThisCrazyTypeSystem
│ ├── class DataRenderer
+ │ ├── class Default
│ ├── class DefaultedConstructorArgument
│ ├── class Demonstrate982
│ ├── class DeprecatedClass
@@ -4698,6 +4776,8 @@ exports[`jsii-tree --types 1`] = `
│ ├── class InterfaceCollections
│ ├── class InterfacesMaker
│ ├── class Isomorphism
+ │ ├── class Issue2638
+ │ ├── class Issue2638B
│ ├── class JSII417Derived
│ ├── class JSII417PublicBaseOfBase
│ ├── class JSObjectLiteralForInterface
@@ -4750,6 +4830,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── class SupportsNiceJavaBuilder
│ ├── class SupportsNiceJavaBuilderWithRequiredProps
│ ├── class SyncVirtualMethods
+ │ ├── class TestStructWithEnum
│ ├── class Thrower
│ ├── class UmaskCheck
│ ├── class UnaryOperation
@@ -4830,6 +4911,7 @@ exports[`jsii-tree --types 1`] = `
│ ├── interface StructA
│ ├── interface StructB
│ ├── interface StructParameterType
+ │ ├── interface StructWithEnum
│ ├── interface StructWithJavaReservedWords
│ ├── interface SupportsNiceJavaBuilderProps
│ ├── interface TopLevelStruct
diff --git a/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap b/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap
index e847895178..0f057f66c1 100644
--- a/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap
+++ b/packages/jsii-reflect/test/__snapshots__/tree.test.ts.snap
@@ -323,32 +323,38 @@ exports[`showAll 1`] = `
│ │ │ └─┬ returnsSpecialParam() method
│ │ │ └── returns: jsii-calc.submodule.param.SpecialParameter
│ │ └─┬ types
- │ │ └─┬ class MyClass
- │ │ ├── interfaces: INamespaced
+ │ │ ├─┬ class MyClass
+ │ │ │ ├── interfaces: INamespaced
+ │ │ │ └─┬ members
+ │ │ │ ├─┬ (props) initializer
+ │ │ │ │ └─┬ parameters
+ │ │ │ │ └─┬ props
+ │ │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
+ │ │ │ ├─┬ methodWithSpecialParam(param) method
+ │ │ │ │ ├─┬ parameters
+ │ │ │ │ │ └─┬ param
+ │ │ │ │ │ └── type: jsii-calc.submodule.param.SpecialParameter
+ │ │ │ │ └── returns: string
+ │ │ │ ├─┬ awesomeness property
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.Awesomeness
+ │ │ │ ├─┬ definedAt property
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: string
+ │ │ │ ├─┬ goodness property
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.Goodness
+ │ │ │ ├─┬ props property
+ │ │ │ │ ├── immutable
+ │ │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
+ │ │ │ └─┬ allTypes property
+ │ │ │ └── type: Optional
+ │ │ └─┬ interface Default
│ │ └─┬ members
- │ │ ├─┬ (props) initializer
- │ │ │ └─┬ parameters
- │ │ │ └─┬ props
- │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
- │ │ ├─┬ methodWithSpecialParam(param) method
- │ │ │ ├─┬ parameters
- │ │ │ │ └─┬ param
- │ │ │ │ └── type: jsii-calc.submodule.param.SpecialParameter
- │ │ │ └── returns: string
- │ │ ├─┬ awesomeness property
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.Awesomeness
- │ │ ├─┬ definedAt property
- │ │ │ ├── immutable
- │ │ │ └── type: string
- │ │ ├─┬ goodness property
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.Goodness
- │ │ ├─┬ props property
- │ │ │ ├── immutable
- │ │ │ └── type: jsii-calc.submodule.child.SomeStruct
- │ │ └─┬ allTypes property
- │ │ └── type: Optional
+ │ │ └─┬ foo property
+ │ │ ├── abstract
+ │ │ ├── immutable
+ │ │ └── type: number
│ └─┬ types
│ ├─┬ class AbstractClass
│ │ ├── base: AbstractClassBase
@@ -841,6 +847,11 @@ exports[`showAll 1`] = `
│ │ │ └─┬ map
│ │ │ └── type: Map any>
│ │ └── returns: string
+ │ ├─┬ class Default
+ │ │ └─┬ members
+ │ │ ├── () initializer
+ │ │ └─┬ pleaseCompile() method
+ │ │ └── returns: void
│ ├─┬ class DefaultedConstructorArgument
│ │ └─┬ members
│ │ ├─┬ (arg1,arg2,arg3) initializer
@@ -1142,6 +1153,12 @@ exports[`showAll 1`] = `
│ │ ├── () initializer
│ │ └─┬ myself() method
│ │ └── returns: jsii-calc.Isomorphism
+ │ ├─┬ class Issue2638
+ │ │ └─┬ members
+ │ │ └── () initializer
+ │ ├─┬ class Issue2638B
+ │ │ └─┬ members
+ │ │ └── () initializer
│ ├─┬ class JSII417Derived
│ │ ├── base: JSII417PublicBaseOfBase
│ │ └─┬ members
@@ -1981,6 +1998,25 @@ exports[`showAll 1`] = `
│ │ │ └── type: string
│ │ └─┬ valueOfOtherProperty property
│ │ └── type: string
+ │ ├─┬ class TestStructWithEnum
+ │ │ └─┬ members
+ │ │ ├── () initializer
+ │ │ ├─┬ isStringEnumA(input) method
+ │ │ │ ├─┬ parameters
+ │ │ │ │ └─┬ input
+ │ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ │ └── returns: boolean
+ │ │ ├─┬ isStringEnumB(input) method
+ │ │ │ ├─┬ parameters
+ │ │ │ │ └─┬ input
+ │ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ │ └── returns: boolean
+ │ │ ├─┬ structWithFoo property
+ │ │ │ ├── immutable
+ │ │ │ └── type: jsii-calc.StructWithEnum
+ │ │ └─┬ structWithFooBar property
+ │ │ ├── immutable
+ │ │ └── type: jsii-calc.StructWithEnum
│ ├─┬ class Thrower
│ │ └─┬ members
│ │ ├── () initializer
@@ -2668,6 +2704,16 @@ exports[`showAll 1`] = `
│ │ ├── abstract
│ │ ├── immutable
│ │ └── type: Optional
+ │ ├─┬ interface StructWithEnum
+ │ │ └─┬ members
+ │ │ ├─┬ foo property
+ │ │ │ ├── abstract
+ │ │ │ ├── immutable
+ │ │ │ └── type: jsii-calc.StringEnum
+ │ │ └─┬ bar property
+ │ │ ├── abstract
+ │ │ ├── immutable
+ │ │ └── type: Optional
│ ├─┬ interface StructWithJavaReservedWords
│ │ └─┬ members
│ │ ├─┬ default property
@@ -3057,7 +3103,8 @@ exports[`types 1`] = `
│ │ │ └─┬ types
│ │ │ └── class ReturnsSpecialParameter
│ │ └─┬ types
- │ │ └── class MyClass
+ │ │ ├── class MyClass
+ │ │ └── interface Default
│ └─┬ types
│ ├── class AbstractClass
│ ├── class AbstractClassBase
@@ -3089,6 +3136,7 @@ exports[`types 1`] = `
│ ├── class ConsumerCanRingBell
│ ├── class ConsumersOfThisCrazyTypeSystem
│ ├── class DataRenderer
+ │ ├── class Default
│ ├── class DefaultedConstructorArgument
│ ├── class Demonstrate982
│ ├── class DeprecatedClass
@@ -3117,6 +3165,8 @@ exports[`types 1`] = `
│ ├── class InterfaceCollections
│ ├── class InterfacesMaker
│ ├── class Isomorphism
+ │ ├── class Issue2638
+ │ ├── class Issue2638B
│ ├── class JSII417Derived
│ ├── class JSII417PublicBaseOfBase
│ ├── class JSObjectLiteralForInterface
@@ -3169,6 +3219,7 @@ exports[`types 1`] = `
│ ├── class SupportsNiceJavaBuilder
│ ├── class SupportsNiceJavaBuilderWithRequiredProps
│ ├── class SyncVirtualMethods
+ │ ├── class TestStructWithEnum
│ ├── class Thrower
│ ├── class UmaskCheck
│ ├── class UnaryOperation
@@ -3249,6 +3300,7 @@ exports[`types 1`] = `
│ ├── interface StructA
│ ├── interface StructB
│ ├── interface StructParameterType
+ │ ├── interface StructWithEnum
│ ├── interface StructWithJavaReservedWords
│ ├── interface SupportsNiceJavaBuilderProps
│ ├── interface TopLevelStruct
diff --git a/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap b/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap
index 0c57a972f7..f7ceb755ab 100644
--- a/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap
+++ b/packages/jsii-reflect/test/__snapshots__/type-system.test.ts.snap
@@ -51,6 +51,7 @@ Array [
"jsii-calc.ConsumerCanRingBell",
"jsii-calc.ConsumersOfThisCrazyTypeSystem",
"jsii-calc.DataRenderer",
+ "jsii-calc.Default",
"jsii-calc.DefaultedConstructorArgument",
"jsii-calc.Demonstrate982",
"jsii-calc.DeprecatedClass",
@@ -82,6 +83,8 @@ Array [
"jsii-calc.InterfaceInNamespaceIncludesClasses.Foo",
"jsii-calc.InterfacesMaker",
"jsii-calc.Isomorphism",
+ "jsii-calc.Issue2638",
+ "jsii-calc.Issue2638B",
"jsii-calc.JSII417Derived",
"jsii-calc.JSII417PublicBaseOfBase",
"jsii-calc.JSObjectLiteralForInterface",
@@ -136,6 +139,7 @@ Array [
"jsii-calc.SupportsNiceJavaBuilder",
"jsii-calc.SupportsNiceJavaBuilderWithRequiredProps",
"jsii-calc.SyncVirtualMethods",
+ "jsii-calc.TestStructWithEnum",
"jsii-calc.Thrower",
"jsii-calc.UmaskCheck",
"jsii-calc.UnaryOperation",