Skip to content

Commit

Permalink
feat(java): overhauled structs with native implementation, builders, …
Browse files Browse the repository at this point in the history
…... (#694)

Overhauled structs with native implementation, builders, `equals` and `hashCode` and creation from JSII.

Fixes #525
  • Loading branch information
bmaizels authored and RomainMuller committed Aug 12, 2019
1 parent d383085 commit b0b3fd2
Show file tree
Hide file tree
Showing 170 changed files with 4,538 additions and 1,810 deletions.
16 changes: 16 additions & 0 deletions packages/jsii-calc/lib/compliance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,22 @@ export interface SecondLevelStruct {
readonly deeperOptionalProp?: string;
}

export interface DiamondInheritanceBaseLevelStruct {
readonly baseLevelProperty: string;
}

export interface DiamondInheritanceFirstMidLevelStruct extends DiamondInheritanceBaseLevelStruct {
readonly firstMidLevelProperty: string;
}

export interface DiamondInheritanceSecondMidLevelStruct extends DiamondInheritanceBaseLevelStruct {
readonly secondMidLevelProperty: string;
}

export interface DiamondInheritanceTopLevelStruct extends DiamondInheritanceFirstMidLevelStruct, DiamondInheritanceSecondMidLevelStruct {
readonly topLevelProperty: string;
}

/**
* Just because we can.
*
Expand Down
142 changes: 138 additions & 4 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,140 @@
}
]
},
"jsii-calc.DiamondInheritanceBaseLevelStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.DiamondInheritanceBaseLevelStruct",
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1778
},
"name": "DiamondInheritanceBaseLevelStruct",
"properties": [
{
"abstract": true,
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1779
},
"name": "baseLevelProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.DiamondInheritanceFirstMidLevelStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.DiamondInheritanceFirstMidLevelStruct",
"interfaces": [
"jsii-calc.DiamondInheritanceBaseLevelStruct"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1782
},
"name": "DiamondInheritanceFirstMidLevelStruct",
"properties": [
{
"abstract": true,
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1783
},
"name": "firstMidLevelProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.DiamondInheritanceSecondMidLevelStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.DiamondInheritanceSecondMidLevelStruct",
"interfaces": [
"jsii-calc.DiamondInheritanceBaseLevelStruct"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1786
},
"name": "DiamondInheritanceSecondMidLevelStruct",
"properties": [
{
"abstract": true,
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1787
},
"name": "secondMidLevelProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.DiamondInheritanceTopLevelStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.DiamondInheritanceTopLevelStruct",
"interfaces": [
"jsii-calc.DiamondInheritanceFirstMidLevelStruct",
"jsii-calc.DiamondInheritanceSecondMidLevelStruct"
],
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1790
},
"name": "DiamondInheritanceTopLevelStruct",
"properties": [
{
"abstract": true,
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1791
},
"name": "topLevelProperty",
"type": {
"primitive": "string"
}
}
]
},
"jsii-calc.DoNotOverridePrivates": {
"assembly": "jsii-calc",
"docs": {
Expand Down Expand Up @@ -7844,7 +7978,7 @@
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1783
"line": 1799
},
"methods": [
{
Expand All @@ -7853,7 +7987,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1792
"line": 1808
},
"name": "howManyVarArgsDidIPass",
"parameters": [
Expand Down Expand Up @@ -7885,7 +8019,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 1784
"line": 1800
},
"name": "roundTrip",
"parameters": [
Expand Down Expand Up @@ -9081,5 +9215,5 @@
}
},
"version": "0.14.3",
"fingerprint": "Ld7vqOD5LvQ5a/I1LdRkj08XkdS+7syV580DELBDa+Y="
"fingerprint": "a/jxMJzoCSejg4NPvGH9qpyWwkZxCHN/zb4T5d00Cto="
}

0 comments on commit b0b3fd2

Please sign in to comment.