Skip to content

Support unnamed class compilation unit#615

Merged
clementdessoude merged 5 commits intojhipster:mainfrom
clementdessoude:support-UnnamedClassCompilationUnit
Nov 12, 2023
Merged

Support unnamed class compilation unit#615
clementdessoude merged 5 commits intojhipster:mainfrom
clementdessoude:support-UnnamedClassCompilationUnit

Conversation

@clementdessoude
Copy link
Copy Markdown
Contributor

What changed with this PR:

Example

// Input
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass { static String greetings() { return "Hello world!"; } }
interface TestInterface { default String greetings() { return "Hello world!"; } }

;
String greeting() { return "Hello, World!"; }

void main() {
  System.out.println(Test.greeting());
}

// Output
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass {

  static String greetings() {
    return "Hello world!";
  }
}

interface TestInterface {
  default String greetings() {
    return "Hello world!";
  }
}

String greeting() {
  return "Hello, World!";
}

void main() {
  System.out.println(Test.greeting());
}

Relative issues or prs:

Closes: #614

@clementdessoude clementdessoude merged commit f489ce2 into jhipster:main Nov 12, 2023
@clementdessoude clementdessoude deleted the support-UnnamedClassCompilationUnit branch November 12, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support preview feature "Unnamed Classes and Instance main Methods "

1 participant