@alloy-js/java 0.23.0-dev.3 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/docs/api/components/ArgumentList.md +31 -0
  4. package/docs/api/components/Class.md +78 -0
  5. package/docs/api/components/Constructor.md +73 -0
  6. package/docs/api/components/Declaration.md +38 -0
  7. package/docs/api/components/Enum.md +72 -0
  8. package/docs/api/components/EnumMember.md +68 -0
  9. package/docs/api/components/EnumMemberList.md +29 -0
  10. package/docs/api/components/ExtendsClause.md +27 -0
  11. package/docs/api/components/ImplementsClause.md +27 -0
  12. package/docs/api/components/ImportStatement.md +31 -0
  13. package/docs/api/components/ImportStatements.md +25 -0
  14. package/docs/api/components/Interface.md +75 -0
  15. package/docs/api/components/MavenProject.md +27 -0
  16. package/docs/api/components/Method.md +80 -0
  17. package/docs/api/components/Modifiers.md +70 -0
  18. package/docs/api/components/Name.md +19 -0
  19. package/docs/api/components/NamedArgumentList.md +27 -0
  20. package/docs/api/components/ObjectDeclaration.md +77 -0
  21. package/docs/api/components/PackageDirectory.md +28 -0
  22. package/docs/api/components/Parameters_2.md +27 -0
  23. package/docs/api/components/PomFile.md +25 -0
  24. package/docs/api/components/PomFileBuild.md +25 -0
  25. package/docs/api/components/ProjectDirectory.md +40 -0
  26. package/docs/api/components/Reference.md +25 -0
  27. package/docs/api/components/SourceFile.md +32 -0
  28. package/docs/api/components/TypeArguments.md +29 -0
  29. package/docs/api/components/TypeParameters.md +27 -0
  30. package/docs/api/components/Value.md +25 -0
  31. package/docs/api/components/Variable.md +71 -0
  32. package/docs/api/components/index.md +32 -0
  33. package/docs/api/components/usePackage.md +19 -0
  34. package/docs/api/contexts/PackageDirectory-context.md +20 -0
  35. package/docs/api/contexts/Project-context.md +20 -0
  36. package/docs/api/contexts/SourceFile-context.md +17 -0
  37. package/docs/api/contexts/index.md +5 -0
  38. package/docs/api/functions/createJavaNamePolicy.md +17 -0
  39. package/docs/api/functions/createLibrary.md +18 -0
  40. package/docs/api/functions/index.md +7 -0
  41. package/docs/api/functions/ref.md +20 -0
  42. package/docs/api/functions/useJavaNamePolicy.md +17 -0
  43. package/docs/api/functions/useLexicalScope.md +17 -0
  44. package/docs/api/index.md +7 -0
  45. package/docs/api/types/CommonDeclarationProps.md +9 -0
  46. package/docs/api/types/CreateLibraryProps.md +10 -0
  47. package/docs/api/types/ExtendsTypeArgumentDescriptor.md +7 -0
  48. package/docs/api/types/GradleProjectConfig.md +6 -0
  49. package/docs/api/types/JavaDependency.md +12 -0
  50. package/docs/api/types/JavaElements.md +5 -0
  51. package/docs/api/types/JavaLexicalScope.md +10 -0
  52. package/docs/api/types/JavaOutputScope.md +5 -0
  53. package/docs/api/types/JavaOutputSymbol.md +15 -0
  54. package/docs/api/types/JavaOutputSymbolOptions.md +9 -0
  55. package/docs/api/types/JavaPackageScope.md +11 -0
  56. package/docs/api/types/JavaProjectScope.md +17 -0
  57. package/docs/api/types/JavaProjectScopeOptions.md +10 -0
  58. package/docs/api/types/LibraryDescriptor.md +7 -0
  59. package/docs/api/types/LibraryRefkeys.md +7 -0
  60. package/docs/api/types/MavenProjectConfig.md +15 -0
  61. package/docs/api/types/NamedTypeArgumentDescriptor.md +7 -0
  62. package/docs/api/types/SuperTypeArgumentDescriptor.md +7 -0
  63. package/docs/api/types/TypeArgumentDescriptor.md +5 -0
  64. package/docs/api/types/WildcardTypeArgumentDescriptor.md +7 -0
  65. package/docs/api/types/index.md +22 -0
  66. package/docs/api/variables/index.md +3 -0
  67. package/docs/api/variables/javaUtil.md +7 -0
  68. package/package.json +6 -6
@@ -0,0 +1,31 @@
1
+ # ArgumentList
2
+
3
+ A list of arguments to be passed to a function, constructor, enum, and so forth. Includes parenthesis when arguments are passed, otherwise returns an empty string.
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { ArgumentList } from "@alloy-js/java";
9
+
10
+
11
+ <ArgumentList args={Children[]} omitParensWhenEmpty />
12
+ ```
13
+
14
+ * stc
15
+
16
+ ```ts
17
+ import { ArgumentList } from "@alloy-js/java/stc";
18
+
19
+
20
+ ArgumentList({
21
+ args: Children[],
22
+ omitParensWhenEmpty: boolean,
23
+ }).children(children)
24
+ ```
25
+
26
+ ## Props
27
+
28
+ | | | |
29
+ | ------------------- | ----------------------------------------------------- | - |
30
+ | args | optional [Children](../../../core/types/children/)\[] | |
31
+ | omitParensWhenEmpty | optional boolean | |
@@ -0,0 +1,78 @@
1
+ # Class
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { Class } from "@alloy-js/java";
7
+
8
+
9
+ <Class
10
+ abstract
11
+ default
12
+ extends={Children}
13
+ final
14
+ generics={Record<string, Children>}
15
+ implements={Children[]}
16
+ name={string | Namekey}
17
+ native
18
+ private
19
+ protected
20
+ public
21
+ refkey={Refkey}
22
+ static
23
+ strictfp
24
+ synchronized
25
+ transient
26
+ volatile
27
+ />
28
+ ```
29
+
30
+ * stc
31
+
32
+ ```ts
33
+ import { Class } from "@alloy-js/java/stc";
34
+
35
+
36
+ Class({
37
+ abstract: boolean,
38
+ default: boolean,
39
+ extends: Children,
40
+ final: boolean,
41
+ generics: Record<string, Children>,
42
+ implements: Children[],
43
+ name: string | Namekey,
44
+ native: boolean,
45
+ private: boolean,
46
+ protected: boolean,
47
+ public: boolean,
48
+ refkey: Refkey,
49
+ static: boolean,
50
+ strictfp: boolean,
51
+ synchronized: boolean,
52
+ transient: boolean,
53
+ volatile: boolean,
54
+ }).children(children)
55
+ ```
56
+
57
+ ## Props
58
+
59
+ | | | |
60
+ | ------------ | ------------------------------------------------------------------- | - |
61
+ | abstract | optional boolean | |
62
+ | children | optional [Children](../../../core/types/children/) | |
63
+ | default | optional boolean | |
64
+ | extends | optional [Children](../../../core/types/children/) | |
65
+ | final | optional boolean | |
66
+ | generics | optional Record\<string, [Children](../../../core/types/children/)> | |
67
+ | implements | optional [Children](../../../core/types/children/)\[] | |
68
+ | name | string \| [Namekey](../../../core/types/namekey/) | |
69
+ | native | optional boolean | |
70
+ | private | optional boolean | |
71
+ | protected | optional boolean | |
72
+ | public | optional boolean | |
73
+ | refkey | optional [Refkey](../../../core/types/refkey/) | |
74
+ | static | optional boolean | |
75
+ | strictfp | optional boolean | |
76
+ | synchronized | optional boolean | |
77
+ | transient | optional boolean | |
78
+ | volatile | optional boolean | |
@@ -0,0 +1,73 @@
1
+ # Constructor
2
+
3
+ Declare a constructor, usually for a class or enum If no name is provided, will try take name from class or enum declaration
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { Constructor } from "@alloy-js/java";
9
+
10
+
11
+ <Constructor
12
+ abstract
13
+ default
14
+ final
15
+ name="string"
16
+ native
17
+ parameters={Record<string, Children>}
18
+ private
19
+ protected
20
+ public
21
+ static
22
+ strictfp
23
+ synchronized
24
+ transient
25
+ volatile
26
+ >
27
+ {children}
28
+ </Constructor>
29
+ ```
30
+
31
+ * stc
32
+
33
+ ```ts
34
+ import { Constructor } from "@alloy-js/java/stc";
35
+
36
+
37
+ Constructor({
38
+ abstract: boolean,
39
+ default: boolean,
40
+ final: boolean,
41
+ name: string,
42
+ native: boolean,
43
+ parameters: Record<string, Children>,
44
+ private: boolean,
45
+ protected: boolean,
46
+ public: boolean,
47
+ static: boolean,
48
+ strictfp: boolean,
49
+ synchronized: boolean,
50
+ transient: boolean,
51
+ volatile: boolean,
52
+ }).children(children)
53
+ ```
54
+
55
+ ## Props
56
+
57
+ | | | |
58
+ | ------------ | ------------------------------------------------------------------- | - |
59
+ | abstract | optional boolean | |
60
+ | children | optional [Children](../../../core/types/children/) | |
61
+ | default | optional boolean | |
62
+ | final | optional boolean | |
63
+ | name | optional string | |
64
+ | native | optional boolean | |
65
+ | parameters | optional Record\<string, [Children](../../../core/types/children/)> | |
66
+ | private | optional boolean | |
67
+ | protected | optional boolean | |
68
+ | public | optional boolean | |
69
+ | static | optional boolean | |
70
+ | strictfp | optional boolean | |
71
+ | synchronized | optional boolean | |
72
+ | transient | optional boolean | |
73
+ | volatile | optional boolean | |
@@ -0,0 +1,38 @@
1
+ # Declaration
2
+
3
+ Declare a symbol in the program. Declaring classes, interfaces, enums, etc. Should also pass in access modifier so we can manage access
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { Declaration } from "@alloy-js/java";
9
+
10
+
11
+ <Declaration
12
+ name={string | Namekey}
13
+ nameKind={JavaElements}
14
+ refkey={Refkey}
15
+ />
16
+ ```
17
+
18
+ * stc
19
+
20
+ ```ts
21
+ import { Declaration } from "@alloy-js/java/stc";
22
+
23
+
24
+ Declaration({
25
+ name: string | Namekey,
26
+ nameKind: JavaElements,
27
+ refkey: Refkey,
28
+ }).children(children)
29
+ ```
30
+
31
+ ## Props
32
+
33
+ | | | |
34
+ | -------- | -------------------------------------------------- | ------------------------------------------------- |
35
+ | children | optional [Children](../../../core/types/children/) | |
36
+ | name | string \| [Namekey](../../../core/types/namekey/) | |
37
+ | nameKind | optional [JavaElements](../../types/javaelements/) | The name policy kind to apply to the declaration. |
38
+ | refkey | optional [Refkey](../../../core/types/refkey/) | |
@@ -0,0 +1,72 @@
1
+ # Enum
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { Enum } from "@alloy-js/java";
7
+
8
+
9
+ <Enum
10
+ abstract
11
+ default
12
+ final
13
+ implements={Children[]}
14
+ name={string | Namekey}
15
+ native
16
+ private
17
+ protected
18
+ public
19
+ refkey={Refkey}
20
+ static
21
+ strictfp
22
+ synchronized
23
+ transient
24
+ volatile
25
+ />
26
+ ```
27
+
28
+ * stc
29
+
30
+ ```ts
31
+ import { Enum } from "@alloy-js/java/stc";
32
+
33
+
34
+ Enum({
35
+ abstract: boolean,
36
+ default: boolean,
37
+ final: boolean,
38
+ implements: Children[],
39
+ name: string | Namekey,
40
+ native: boolean,
41
+ private: boolean,
42
+ protected: boolean,
43
+ public: boolean,
44
+ refkey: Refkey,
45
+ static: boolean,
46
+ strictfp: boolean,
47
+ synchronized: boolean,
48
+ transient: boolean,
49
+ volatile: boolean,
50
+ }).children(children)
51
+ ```
52
+
53
+ ## Props
54
+
55
+ | | | |
56
+ | ------------ | ----------------------------------------------------- | - |
57
+ | abstract | optional boolean | |
58
+ | children | optional [Children](../../../core/types/children/) | |
59
+ | default | optional boolean | |
60
+ | final | optional boolean | |
61
+ | implements | optional [Children](../../../core/types/children/)\[] | |
62
+ | name | string \| [Namekey](../../../core/types/namekey/) | |
63
+ | native | optional boolean | |
64
+ | private | optional boolean | |
65
+ | protected | optional boolean | |
66
+ | public | optional boolean | |
67
+ | refkey | optional [Refkey](../../../core/types/refkey/) | |
68
+ | static | optional boolean | |
69
+ | strictfp | optional boolean | |
70
+ | synchronized | optional boolean | |
71
+ | transient | optional boolean | |
72
+ | volatile | optional boolean | |
@@ -0,0 +1,68 @@
1
+ # EnumMember
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { EnumMember } from "@alloy-js/java";
7
+
8
+
9
+ <EnumMember
10
+ abstract
11
+ args={Children[]}
12
+ default
13
+ final
14
+ name="string"
15
+ native
16
+ private
17
+ protected
18
+ public
19
+ static
20
+ strictfp
21
+ synchronized
22
+ transient
23
+ volatile
24
+ />
25
+ ```
26
+
27
+ * stc
28
+
29
+ ```ts
30
+ import { EnumMember } from "@alloy-js/java/stc";
31
+
32
+
33
+ EnumMember({
34
+ abstract: boolean,
35
+ args: Children[],
36
+ default: boolean,
37
+ final: boolean,
38
+ name: string,
39
+ native: boolean,
40
+ private: boolean,
41
+ protected: boolean,
42
+ public: boolean,
43
+ static: boolean,
44
+ strictfp: boolean,
45
+ synchronized: boolean,
46
+ transient: boolean,
47
+ volatile: boolean,
48
+ }).children(children)
49
+ ```
50
+
51
+ ## Props
52
+
53
+ | | | |
54
+ | ------------ | ----------------------------------------------------- | - |
55
+ | abstract | optional boolean | |
56
+ | args | optional [Children](../../../core/types/children/)\[] | |
57
+ | default | optional boolean | |
58
+ | final | optional boolean | |
59
+ | name | string | |
60
+ | native | optional boolean | |
61
+ | private | optional boolean | |
62
+ | protected | optional boolean | |
63
+ | public | optional boolean | |
64
+ | static | optional boolean | |
65
+ | strictfp | optional boolean | |
66
+ | synchronized | optional boolean | |
67
+ | transient | optional boolean | |
68
+ | volatile | optional boolean | |
@@ -0,0 +1,29 @@
1
+ # EnumMemberList
2
+
3
+ Create a list of enum members, joining with a comma and a hardline, and ending with a semicolon.
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { EnumMemberList } from "@alloy-js/java";
9
+
10
+
11
+ <EnumMemberList >
12
+ {children}
13
+ </EnumMemberList>
14
+ ```
15
+
16
+ * stc
17
+
18
+ ```ts
19
+ import { EnumMemberList } from "@alloy-js/java/stc";
20
+
21
+
22
+ EnumMemberList({ }).children(children)
23
+ ```
24
+
25
+ ## Props
26
+
27
+ | | | |
28
+ | -------- | ----------------------------------------- | - |
29
+ | children | [Children](../../../core/types/children/) | |
@@ -0,0 +1,27 @@
1
+ # ExtendsClause
2
+
3
+ The extends clause for a class or interface.
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { ExtendsClause } from "@alloy-js/java";
9
+
10
+
11
+ <ExtendsClause extends={Children[] | undefined} />
12
+ ```
13
+
14
+ * stc
15
+
16
+ ```ts
17
+ import { ExtendsClause } from "@alloy-js/java/stc";
18
+
19
+
20
+ ExtendsClause({ extends: Children[] | undefined }).children(children)
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | | | |
26
+ | ------- | --------------------------------------------------------- | - |
27
+ | extends | [Children](../../../core/types/children/)\[] \| undefined | |
@@ -0,0 +1,27 @@
1
+ # ImplementsClause
2
+
3
+ The implements clause for a class, interface, or enum.
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { ImplementsClause } from "@alloy-js/java";
9
+
10
+
11
+ <ImplementsClause interfaces={Children[] | undefined} />
12
+ ```
13
+
14
+ * stc
15
+
16
+ ```ts
17
+ import { ImplementsClause } from "@alloy-js/java/stc";
18
+
19
+
20
+ ImplementsClause({ interfaces: Children[] | undefined }).children(children)
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | | | |
26
+ | ---------- | --------------------------------------------------------- | - |
27
+ | interfaces | [Children](../../../core/types/children/)\[] \| undefined | |
@@ -0,0 +1,31 @@
1
+ # ImportStatement
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { ImportStatement } from "@alloy-js/java";
7
+
8
+
9
+ <ImportStatement name="string" package="string" wildcard />
10
+ ```
11
+
12
+ * stc
13
+
14
+ ```ts
15
+ import { ImportStatement } from "@alloy-js/java/stc";
16
+
17
+
18
+ ImportStatement({
19
+ name: string,
20
+ package: string,
21
+ wildcard: boolean,
22
+ }).children(children)
23
+ ```
24
+
25
+ ## Props
26
+
27
+ | | | |
28
+ | -------- | ---------------- | - |
29
+ | name | optional string | |
30
+ | package | string | |
31
+ | wildcard | optional boolean | |
@@ -0,0 +1,25 @@
1
+ # ImportStatements
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { ImportStatements } from "@alloy-js/java";
7
+
8
+
9
+ <ImportStatements imports={ImportSymbol[]} />
10
+ ```
11
+
12
+ * stc
13
+
14
+ ```ts
15
+ import { ImportStatements } from "@alloy-js/java/stc";
16
+
17
+
18
+ ImportStatements({ imports: ImportSymbol[] }).children(children)
19
+ ```
20
+
21
+ ## Props
22
+
23
+ | | | |
24
+ | ------- | -------------------------------------- | - |
25
+ | imports | [ImportSymbol](../importstatement/)\[] | |
@@ -0,0 +1,75 @@
1
+ # Interface
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { Interface } from "@alloy-js/java";
7
+
8
+
9
+ <Interface
10
+ abstract
11
+ default
12
+ extends={Children[]}
13
+ final
14
+ generics={Record<string, Children>}
15
+ name={string | Namekey}
16
+ native
17
+ private
18
+ protected
19
+ public
20
+ refkey={Refkey}
21
+ static
22
+ strictfp
23
+ synchronized
24
+ transient
25
+ volatile
26
+ />
27
+ ```
28
+
29
+ * stc
30
+
31
+ ```ts
32
+ import { Interface } from "@alloy-js/java/stc";
33
+
34
+
35
+ Interface({
36
+ abstract: boolean,
37
+ default: boolean,
38
+ extends: Children[],
39
+ final: boolean,
40
+ generics: Record<string, Children>,
41
+ name: string | Namekey,
42
+ native: boolean,
43
+ private: boolean,
44
+ protected: boolean,
45
+ public: boolean,
46
+ refkey: Refkey,
47
+ static: boolean,
48
+ strictfp: boolean,
49
+ synchronized: boolean,
50
+ transient: boolean,
51
+ volatile: boolean,
52
+ }).children(children)
53
+ ```
54
+
55
+ ## Props
56
+
57
+ | | | |
58
+ | ------------ | ------------------------------------------------------------------- | - |
59
+ | abstract | optional boolean | |
60
+ | children | optional [Children](../../../core/types/children/) | |
61
+ | default | optional boolean | |
62
+ | extends | optional [Children](../../../core/types/children/)\[] | |
63
+ | final | optional boolean | |
64
+ | generics | optional Record\<string, [Children](../../../core/types/children/)> | |
65
+ | name | string \| [Namekey](../../../core/types/namekey/) | |
66
+ | native | optional boolean | |
67
+ | private | optional boolean | |
68
+ | protected | optional boolean | |
69
+ | public | optional boolean | |
70
+ | refkey | optional [Refkey](../../../core/types/refkey/) | |
71
+ | static | optional boolean | |
72
+ | strictfp | optional boolean | |
73
+ | synchronized | optional boolean | |
74
+ | transient | optional boolean | |
75
+ | volatile | optional boolean | |
@@ -0,0 +1,27 @@
1
+ # MavenProject
2
+
3
+ Represents a maven project. Use if you want to generate a Java project
4
+
5
+ * jsx
6
+
7
+ ```tsx
8
+ import { MavenProject } from "@alloy-js/java";
9
+
10
+
11
+ <MavenProject projectConfig={MavenProjectConfig} />
12
+ ```
13
+
14
+ * stc
15
+
16
+ ```ts
17
+ import { MavenProject } from "@alloy-js/java/stc";
18
+
19
+
20
+ MavenProject({ projectConfig: MavenProjectConfig }).children(children)
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | | | |
26
+ | ------------- | ----------------------------------------------------- | - |
27
+ | projectConfig | [MavenProjectConfig](../../types/mavenprojectconfig/) | |
@@ -0,0 +1,80 @@
1
+ # Method
2
+
3
+ * jsx
4
+
5
+ ```tsx
6
+ import { Method } from "@alloy-js/java";
7
+
8
+
9
+ <Method
10
+ abstract
11
+ default
12
+ final
13
+ generics={Record<string, Children>}
14
+ name="string"
15
+ native
16
+ parameters={Record<string, Children>}
17
+ private
18
+ protected
19
+ public
20
+ return={Children}
21
+ static
22
+ strictfp
23
+ synchronized
24
+ throws={Children}
25
+ transient
26
+ volatile
27
+ >
28
+ {children}
29
+ </Method>
30
+ ```
31
+
32
+ * stc
33
+
34
+ ```ts
35
+ import { Method } from "@alloy-js/java/stc";
36
+
37
+
38
+ Method({
39
+ abstract: boolean,
40
+ default: boolean,
41
+ final: boolean,
42
+ generics: Record<string, Children>,
43
+ name: string,
44
+ native: boolean,
45
+ parameters: Record<string, Children>,
46
+ private: boolean,
47
+ protected: boolean,
48
+ public: boolean,
49
+ return: Children,
50
+ static: boolean,
51
+ strictfp: boolean,
52
+ synchronized: boolean,
53
+ throws: Children,
54
+ transient: boolean,
55
+ volatile: boolean,
56
+ }).children(children)
57
+ ```
58
+
59
+ ## Props
60
+
61
+ | | | |
62
+ | ------------ | ------------------------------------------------------------------- | - |
63
+ | abstract | optional boolean | |
64
+ | children | optional [Children](../../../core/types/children/) | |
65
+ | default | optional boolean | |
66
+ | final | optional boolean | |
67
+ | generics | optional Record\<string, [Children](../../../core/types/children/)> | |
68
+ | name | string | |
69
+ | native | optional boolean | |
70
+ | parameters | optional Record\<string, [Children](../../../core/types/children/)> | |
71
+ | private | optional boolean | |
72
+ | protected | optional boolean | |
73
+ | public | optional boolean | |
74
+ | return | optional [Children](../../../core/types/children/) | |
75
+ | static | optional boolean | |
76
+ | strictfp | optional boolean | |
77
+ | synchronized | optional boolean | |
78
+ | throws | optional [Children](../../../core/types/children/) | |
79
+ | transient | optional boolean | |
80
+ | volatile | optional boolean | |