@@ -21,7 +21,7 @@ codeflash/
2121├── api/ # AI service communication
2222├── code_utils/ # Code parsing, git utilities
2323├── models/ # Pydantic models and types
24- ├── languages/ # Multi-language support (Python, JavaScript/TypeScript, Java planned )
24+ ├── languages/ # Multi-language support (Python, JavaScript/TypeScript, Java)
2525│ ├── base.py # LanguageSupport protocol and shared data types
2626│ ├── registry.py # Language registration and lookup by extension/enum
2727│ ├── current.py # Current language singleton (set_current_language / current_language_support)
@@ -35,11 +35,29 @@ codeflash/
3535│ │ ├── test_runner.py # Test subprocess execution for Python
3636│ │ ├── instrument_codeflash_capture.py # Instrument __init__ with capture decorators
3737│ │ └── parse_line_profile_test_output.py # Parse line profiler output
38- │ └── javascript/
39- │ ├── support.py # JavaScriptSupport (LanguageSupport implementation)
40- │ ├── function_optimizer.py # JavaScriptFunctionOptimizer subclass
41- │ ├── optimizer.py # JS project root finding & module preparation
42- │ └── normalizer.py # JS/TS code normalization for deduplication
38+ │ ├── javascript/
39+ │ │ ├── support.py # JavaScriptSupport (LanguageSupport implementation)
40+ │ │ ├── function_optimizer.py # JavaScriptFunctionOptimizer subclass
41+ │ │ ├── optimizer.py # JS project root finding & module preparation
42+ │ │ └── normalizer.py # JS/TS code normalization for deduplication
43+ │ └── java/
44+ │ ├── support.py # JavaSupport (LanguageSupport implementation)
45+ │ ├── function_optimizer.py # JavaFunctionOptimizer subclass
46+ │ ├── build_tool_strategy.py # Abstract BuildToolStrategy for Maven/Gradle
47+ │ ├── maven_strategy.py # Maven build tool strategy
48+ │ ├── gradle_strategy.py # Gradle build tool strategy
49+ │ ├── build_tools.py # Build tool detection and project info
50+ │ ├── build_config_strategy.py # Config read/write for pom.xml / gradle.properties
51+ │ ├── test_runner.py # Test execution via Maven/Gradle
52+ │ ├── instrumentation.py # Behavior capture and benchmarking instrumentation
53+ │ ├── discovery.py # Function discovery using tree-sitter
54+ │ ├── test_discovery.py # Test discovery for JUnit/TestNG
55+ │ ├── context.py # Code context extraction
56+ │ ├── comparator.py # Test result comparison
57+ │ ├── config.py # Java project detection and config
58+ │ ├── formatter.py # Code formatting and normalization
59+ │ ├── line_profiler.py # JVM bytecode agent-based line profiling
60+ │ └── tracer.py # Two-stage JFR + argument capture tracer
4361├── setup/ # Config schema, auto-detection, first-run experience
4462├── picklepatch/ # Serialization/deserialization utilities
4563├── tracing/ # Function call tracing
@@ -57,7 +75,7 @@ codeflash/
5775| ------| ------------|
5876| CLI arguments & commands | ` cli_cmds/cli.py ` (parsing), ` main.py ` (subcommand dispatch) |
5977| Optimization orchestration | ` optimization/optimizer.py ` → ` run() ` |
60- | Per-function optimization | ` languages/function_optimizer.py ` (base), ` languages/python/function_optimizer.py ` , ` languages/javascript/function_optimizer.py ` |
78+ | Per-function optimization | ` languages/function_optimizer.py ` (base), ` languages/python/function_optimizer.py ` , ` languages/javascript/function_optimizer.py ` , ` languages/java/function_optimizer.py ` |
6179| Function discovery | ` discovery/functions_to_optimize.py ` |
6280| Context extraction | ` languages/<lang>/context/code_context_extractor.py ` |
6381| Test execution | ` languages/<lang>/support.py ` (` run_behavioral_tests ` , etc.), ` verification/pytest_plugin.py ` |
@@ -67,7 +85,7 @@ codeflash/
6785
6886## LanguageSupport Protocol Methods
6987
70- Core protocol in ` languages/base.py ` . Each language (` PythonSupport ` , ` JavaScriptSupport ` ) implements these.
88+ Core protocol in ` languages/base.py ` . Each language (` PythonSupport ` , ` JavaScriptSupport ` , ` JavaSupport ` ) implements these.
7189
7290| Category | Method/Property | Purpose |
7391| ----------| ----------------| ---------|
0 commit comments