-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: java class parsing failed (#23)
- Loading branch information
Showing
9 changed files
with
124 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
heo-core/src/main/java/dev/heowc/heo/core/ParserConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package dev.heowc.heo.core; | ||
|
||
import com.github.javaparser.JavaParser; | ||
import com.github.javaparser.ParserConfiguration; | ||
import com.github.javaparser.ParserConfiguration.LanguageLevel; | ||
import com.github.javaparser.utils.ParserCollectionStrategy; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration(proxyBeanMethods = false) | ||
class ParserConfig { | ||
|
||
@Bean | ||
ParserConfiguration parserConfiguration() { | ||
final ParserConfiguration configuration = new ParserConfiguration(); | ||
configuration.setLanguageLevel(LanguageLevel.JAVA_17); | ||
return configuration; | ||
} | ||
|
||
@Bean | ||
ParserCollectionStrategy parserCollectionStrategy(ParserConfiguration parserConfiguration) { | ||
return new ParserCollectionStrategy(parserConfiguration); | ||
} | ||
|
||
@Bean | ||
JavaParser javaParser(ParserConfiguration parserConfiguration) { | ||
return new JavaParser(parserConfiguration); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
heo-core/src/main/java/dev/heowc/heo/core/loader/ModuleLoaderConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.heowc.heo.core.loader; | ||
|
||
public record ModuleLoaderConfig(String projectDirectory, String rootPackage) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters