
public class RuleReplaceWith extends Rule
runtimeRebindRuleGenerator| Constructor and Description |
|---|
RuleReplaceWith(String typeName) |
| Modifier and Type | Method and Description |
|---|---|
protected 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 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.
|
String |
getReplacementTypeName() |
RebindResult |
realize(TreeLogger logger,
StandardGeneratorContext context,
String typeName) |
String |
toString() |
dispose, getFallbackEvaluationCost, getRootCondition, isApplicablepublic RuleReplaceWith(String typeName)
public void generateRuntimeRebindClasses(TreeLogger logger, ModuleDef module, GeneratorContext context) throws UnableToCompleteException
RulegenerateRuntimeRebindClasses in class RuleUnableToCompleteExceptionpublic String getReplacementTypeName()
public RebindResult realize(TreeLogger logger, StandardGeneratorContext context, String typeName) throws UnableToCompleteException
realize in class RuleUnableToCompleteExceptionprotected String generateCreateInstanceExpression()
RulegenerateCreateInstanceExpression in class Ruleprotected String generateMatchesExpression()
RulegenerateMatchesExpression in class RuleCopyright © 2018. All rights reserved.