public abstract class Rule extends Object
Modifier and Type | Field and Description |
---|---|
protected RuntimeRebindRuleGenerator |
runtimeRebindRuleGenerator |
Constructor and Description |
---|
Rule() |
Modifier and Type | Method and Description |
---|---|
protected void |
dispose() |
protected abstract String |
generateCreateInstanceExpression()
Generate and return a String of Java source that will create an instance of whatever type this
Rule intends to rebind to.
|
protected abstract String |
generateMatchesExpression()
Generate and return a String of Java source that will act as a condition to filter the runtime
environment and only pass when the Rule's intended conditions are met.
|
void |
generateRuntimeRebindClasses(TreeLogger logger,
ModuleDef module,
GeneratorContext context)
Generate runtime rebind classes that perform the same rebinding behavior represented by the
current Rule.
|
int |
getFallbackEvaluationCost()
Returns the cost of evaluation fallback binding values.
|
ConditionAll |
getRootCondition() |
boolean |
isApplicable(TreeLogger logger,
StandardGeneratorContext context,
String typeName) |
abstract RebindResult |
realize(TreeLogger logger,
StandardGeneratorContext context,
String typeName) |
protected RuntimeRebindRuleGenerator runtimeRebindRuleGenerator
public void generateRuntimeRebindClasses(TreeLogger logger, ModuleDef module, GeneratorContext context) throws UnableToCompleteException
UnableToCompleteException
public int getFallbackEvaluationCost()
public ConditionAll getRootCondition()
public boolean isApplicable(TreeLogger logger, StandardGeneratorContext context, String typeName) throws UnableToCompleteException
UnableToCompleteException
public abstract RebindResult realize(TreeLogger logger, StandardGeneratorContext context, String typeName) throws UnableToCompleteException
UnableToCompleteException
protected void dispose()
protected abstract String generateCreateInstanceExpression()
protected abstract String generateMatchesExpression()
Copyright © 2018. All rights reserved.