Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/PPublic

Commit40038c8

Browse files
authored
Update java generator code to generate updated imports from maven (#894)
1 parent9dca1bc commit40038c8

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

‎Src/PCompiler/CompilerCore/Backend/Java/Constants.cs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal static class Constants
1515
{
1616
#region P Java runtime constants
1717

18-
publicstaticreadonlystringPRTNamespaceName="com.amazon.pobserve.runtime";
18+
publicstaticreadonlystringPRTNamespaceName="pobserve.runtime";
1919

2020
publicstaticreadonlystringTryAssertMethodName="tryAssert";
2121
publicstaticreadonlystringTryRaiseEventMethodName="tryRaiseEvent";
@@ -117,15 +117,15 @@ internal static string AsFFIComment(string line)
117117
xsi:schemaLocation=""http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"">
118118
<modelVersion>4.0.0</modelVersion>
119119
120-
<groupId>com.amazon.p</groupId>
120+
<groupId>io.github.p</groupId>
121121
<artifactId>-package-name-</artifactId>
122122
<version>1.0-SNAPSHOT</version>
123123
124124
<name>-package-name-</name>
125125
<properties>
126126
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
127-
<maven.compiler.source>11</maven.compiler.source>
128-
<maven.compiler.target>11</maven.compiler.target>
127+
<maven.compiler.source>17</maven.compiler.source>
128+
<maven.compiler.target>17</maven.compiler.target>
129129
<buildDirectory>${{project.basedir}}/PObserve</buildDirectory>
130130
</properties>
131131
<packaging>jar</packaging>
@@ -185,35 +185,35 @@ internal static string AsFFIComment(string line)
185185
/// The fully-qualified name of the static `deepClone(PrtValue)` method exposed by
186186
/// the Java PRT runtime.
187187
/// </summary>
188-
internalstaticreadonlystringPrtDeepCloneMethodName="com.amazon.pobserve.runtime.values.Clone.deepClone";
188+
internalstaticreadonlystringPrtDeepCloneMethodName="pobserve.runtime.values.Clone.deepClone";
189189

190190
/// <summary>
191191
/// The fully-qualified name of the static `deepEquality(Object, Object)` method
192192
/// exposed by the Java PRT runtime.
193193
/// </summary>
194-
internalstaticreadonlystringPrtDeepEqualsMethodName="com.amazon.pobserve.runtime.values.Equality.deepEquals";
194+
internalstaticreadonlystringPrtDeepEqualsMethodName="pobserve.runtime.values.Equality.deepEquals";
195195

196196
/// <summary>
197197
/// The fully-qualified name of the static `compare(Comparable, Comparable)` method
198198
/// exposed by the Java PRT runtime.
199199
/// </summary>
200-
internalstaticreadonlystringPrtCompareMethodName="com.amazon.pobserve.runtime.values.Equality.compare";
200+
internalstaticreadonlystringPrtCompareMethodName="pobserve.runtime.values.Equality.compare";
201201

202202
/// <summary>
203203
/// The fully-qualified name of the static `elementAt(LinkedHashSet, long)` method
204204
/// exposed by the Java PRT runtime.
205205
/// </summary>
206-
internalstaticreadonlystringPrtSetElementAtMethodName="com.amazon.pobserve.runtime.values.SetIndexing.elementAt";
206+
internalstaticreadonlystringPrtSetElementAtMethodName="pobserve.runtime.values.SetIndexing.elementAt";
207207

208208
/// <summary>
209209
/// The fully-qualified class name of the Java P runtime's PValue class.
210210
/// </summary>
211-
internalstaticreadonlystringPValueClass="com.amazon.pobserve.runtime.values.PValue";
211+
internalstaticreadonlystringPValueClass="pobserve.runtime.values.PValue";
212212

213213
/// <summary>
214214
/// The fully-qualified class name of the Java P runtime's PEvent class.
215215
/// </summary>
216-
internalstaticreadonlystringEventsClass="com.amazon.pobserve.runtime.events.PEvent";
216+
internalstaticreadonlystringEventsClass="pobserve.runtime.events.PEvent";
217217

218218
#endregion
219219

‎Src/PCompiler/CompilerCore/Backend/Java/MachineGenerator.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void WriteMonitorDecl()
7676
{
7777
varcname=Names.GetNameForDecl(_currentMachine);
7878

79-
WriteLine($"public static class{cname} extendscom.amazon.pobserve.runtime.Monitor<{cname}.{Constants.StateEnumName}> implements Serializable {{");
79+
WriteLine($"public static class{cname} extends pobserve.runtime.Monitor<{cname}.{Constants.StateEnumName}> implements Serializable {{");
8080

8181
WriteLine();
8282
WriteSupplierCDef(cname);
@@ -229,11 +229,11 @@ private void WriteFunctionSignature(Function f)
229229
varthrowables=newList<string>();
230230
if(f.CanChangeState)
231231
{
232-
throwables.Add("com.amazon.pobserve.runtime.exceptions.TransitionException");
232+
throwables.Add("pobserve.runtime.exceptions.TransitionException");
233233
}
234234
if(f.CanRaiseEvent)
235235
{
236-
throwables.Add("com.amazon.pobserve.runtime.exceptions.RaiseEventException");
236+
throwables.Add("pobserve.runtime.exceptions.RaiseEventException");
237237
}
238238
if(throwables.Count>0)
239239
{
@@ -283,9 +283,9 @@ private void WriteEventsAccessor()
283283
privatevoidWriteStateBuilderDecl(States,boolisConstructor)
284284
{
285285
if(isConstructor){
286-
WriteLine($"addState(com.amazon.pobserve.runtime.State.keyedOn({Names.IdentForState(s)})");
286+
WriteLine($"addState(pobserve.runtime.State.keyedOn({Names.IdentForState(s)})");
287287
}else{
288-
WriteLine($"registerState(com.amazon.pobserve.runtime.State.keyedOn({Names.IdentForState(s)})");
288+
WriteLine($"registerState(pobserve.runtime.State.keyedOn({Names.IdentForState(s)})");
289289
}
290290

291291
if(s.IsStart)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp