MetaDone
|
Public Member Functions | |
GuardEngine (GrasylaContext context, ConcreteObject expression, Engine parent) throws BadPreCondition | |
Protected Member Functions | |
boolean | isNativeAttribute (String name) |
void | notifyChildChanged (Engine child, ChildComponent comp) |
Package Functions | |
protected< C > Component <?extends C > | buildNewComponent (Class< C > clComp) throws BadPreCondition |
protected< C > Component <?extends C > | buildNewTrueComponent (Class< C > clComp, boolean active) throws BadPreCondition |
protected< C > Component <?extends C > | buildNewFalseComponent (Class< C > clComp) throws BadPreCondition |
Static Package Attributes | |
static final Object | FALSE_INDICATOR = false |
Static Private Attributes | |
static final String | ATTR_COND = "condition" |
A guard (condition evaluation) for a if.
Evaluated as the given class.
true
or such an attribute does not exist, the result is the concatenation of the values of the content components. Otherwise, an empty component is built with the FALSE_INDICATOR. metadone.client.grasyla2.generic.GuardEngine.GuardEngine | ( | GrasylaContext | context, |
ConcreteObject | expression, | ||
Engine | parent | ||
) | throws BadPreCondition |
Initializes this engine.
context | The context |
expression | The expression |
parent | The parent or null |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaEngine.expression, and metadone.client.grasyla2.GrasylaEngine.parent.
protected<C> Component<? extends C> metadone.client.grasyla2.generic.GuardEngine.buildNewComponent | ( | Class< C > | clComp | ) | throws BadPreCondition [package, virtual] |
Builds a new component.
<C> | The type |
clComp | The class |
BadPreCondition |
Reimplemented from metadone.client.grasyla2.generic.GroupEngine.
References metadone.client.grasyla2.generic.GuardEngine.ATTR_COND, metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.generic.GuardEngine.buildNewFalseComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewTrueComponent(), metadone.client.grasyla2.GrasylaEngine.getAttributes(), and metadone.client.grasyla2.GrasylaEngine.getContext().
protected<C> Component<? extends C> metadone.client.grasyla2.generic.GuardEngine.buildNewFalseComponent | ( | Class< C > | clComp | ) | throws BadPreCondition [package] |
Builds a new false
component.
<C> | The type |
clComp | The class |
BadPreCondition |
References metadone.client.grasyla2.generic.GuardEngine.FALSE_INDICATOR.
Referenced by metadone.client.grasyla2.generic.GuardEngine.buildNewComponent(), and metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged().
protected<C> Component<? extends C> metadone.client.grasyla2.generic.GuardEngine.buildNewTrueComponent | ( | Class< C > | clComp, |
boolean | active | ||
) | throws BadPreCondition [package] |
Builds a new true
component.
<C> | The type |
clComp | The class |
active | Whether to activate |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.activate().
Referenced by metadone.client.grasyla2.generic.GuardEngine.buildNewComponent(), and metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged().
boolean metadone.client.grasyla2.generic.GuardEngine.isNativeAttribute | ( | String | name | ) | [protected] |
Indicates whether an attribute is handled when building the component.
In other words, a native attribute should not be handled by an attribute handler.
name | The name of the attribute |
true
if name is a native attribute Reimplemented from metadone.client.grasyla2.GrasylaEngine.
References metadone.client.grasyla2.generic.GuardEngine.ATTR_COND.
void metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged | ( | Engine | child, |
ChildComponent | comp | ||
) | [protected] |
Reimplemented from metadone.client.grasyla2.generic.GroupEngine.
References metadone.client.grasyla2.generic.GuardEngine.ATTR_COND, metadone.client.grasyla2.generic.GuardEngine.buildNewFalseComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewTrueComponent(), metadone.client.grasyla2.GrasylaEngine.clearChildren(), metadone.client.grasyla2.GrasylaEngine.clearChildrenExpressions(), metadone.client.grasyla2.GrasylaEngine.ChildComponent.getAttribute(), metadone.client.grasyla2.GrasylaEngine.ChildComponent.getComponent(), metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.client.grasyla2.GrasylaEngine.getState(), metadone.client.grasyla2.GrasylaEngine.isActive(), metadone.client.grasyla2.GrasylaEngine.logger, and metadone.client.grasyla2.GrasylaEngine.updateComponent().
final String metadone.client.grasyla2.generic.GuardEngine.ATTR_COND = "condition" [static, private] |
final Object metadone.client.grasyla2.generic.GuardEngine.FALSE_INDICATOR = false [static, package] |
Indicator that the condition has been evaluated to false.
Referenced by metadone.client.grasyla2.generic.GuardEngine.buildNewFalseComponent(), metadone.client.grasyla2.generic.IfEngine.evaluateSimple(), and metadone.client.grasyla2.generic.IfEngine.rebuildSingle().