Package com.helix.core
Class RuleCompiler
java.lang.Object
com.helix.core.RuleCompiler
End-to-end rule compiler orchestrating JSON parsing, AST construction, static type checking,
AST optimization, and dynamic bytecode generation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRuleCompiler(RuleCompiler.GeneratorType defaultGeneratorType) RuleCompiler(RuleCompiler.GeneratorType defaultGeneratorType, boolean profilingEnabled) -
Method Summary
Modifier and TypeMethodDescriptionCompiles a pre-parsedRuleobject into an executableCompiledRule.compile(Rule rule, RuleCompiler.GeneratorType generatorType) Compiles a raw JSON rule string into an executableCompiledRule.compile(String jsonRule, RuleCompiler.GeneratorType generatorType) Compiles a raw JSON rule string using a specifiedRuleCompiler.GeneratorType.boolean
-
Constructor Details
-
RuleCompiler
public RuleCompiler() -
RuleCompiler
-
RuleCompiler
-
-
Method Details
-
compile
Compiles a raw JSON rule string into an executableCompiledRule.- Parameters:
jsonRule- JSON rule payload- Returns:
- compiled rule instance
- Throws:
RuleCompilationException- if compilation fails at any pipeline stage
-
compile
public CompiledRule compile(String jsonRule, RuleCompiler.GeneratorType generatorType) throws RuleCompilationException Compiles a raw JSON rule string using a specifiedRuleCompiler.GeneratorType.- Parameters:
jsonRule- JSON rule payloadgeneratorType- bytecode generator strategy- Returns:
- compiled rule instance
- Throws:
RuleCompilationException- if compilation fails at any stage
-
compile
Compiles a pre-parsedRuleobject into an executableCompiledRule.- Parameters:
rule- rule definition- Returns:
- compiled rule instance
- Throws:
RuleCompilationException- if compilation fails
-
compile
public CompiledRule compile(Rule rule, RuleCompiler.GeneratorType generatorType) throws RuleCompilationException - Throws:
RuleCompilationException
-
isProfilingEnabled
public boolean isProfilingEnabled() -
getBytecodeOptimizer
-