ammachado opened a new pull request, #23382: URL: https://github.com/apache/camel/pull/23382
# Description Extracts the `body`, `header`, and `variable` function groups out of the monolithic `SimpleFunctionExpression` into dedicated `SimpleLanguageFunctionFactory` implementations (`BodyFunctionFactory`, `HeaderFunctionFactory`, `VariableFunctionFactory`), following the same pattern already established by `RandomFunctionFactory`, `SkipFunctionFactory`, `CollateFunctionFactory`, and `JoinFunctionFactory`. Shared parsing utilities (`ifStartsWithReturnRemainder`, `splitOgnl`, `ognlCodeMethods`, `appendClass`, `parseInHeader`, `parseVariable`) are consolidated in `SimpleFunctionHelper` so the new factories can import them without creating a circular dependency on the `ast` package. Both the runtime (`createFunction`) and CSimple code-generation (`createCode`) paths are covered. Unit tests are added for each factory (`BodyFunctionFactoryTest`, `HeaderFunctionFactoryTest`, `VariableFunctionFactoryTest`). The two legacy dispatch methods (`tryCreate`, `tryCreateCode`) in `SimpleFunctionDispatcher` are kept as `@Deprecated(forRemoval = true)` with a Javadoc note that they are candidates for removal once all functions are extracted (CAMEL-22894). # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-22894) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. _Claude Code on behalf of Adriano Machado_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
