MetaDone
metadone.client.grasyla2.generic.GuardEngine Class Reference
Inheritance diagram for metadone.client.grasyla2.generic.GuardEngine:
Collaboration diagram for metadone.client.grasyla2.generic.GuardEngine:

List of all members.

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"

Detailed Description

A guard (condition evaluation) for a if.

Attributes

Contents

Evaluated as the given class.

Result
If the `condition` has been evaluated to 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.
Author:
kma
See also:
IfEngine
GroupEngine

Constructor & Destructor Documentation

metadone.client.grasyla2.generic.GuardEngine.GuardEngine ( GrasylaContext  context,
ConcreteObject  expression,
Engine  parent 
) throws BadPreCondition

Initializes this engine.

Parameters:
contextThe context
expressionThe expression
parentThe parent or null
Exceptions:
BadPreCondition

References metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaEngine.expression, and metadone.client.grasyla2.GrasylaEngine.parent.


Member Function Documentation

protected<C> Component<? extends C> metadone.client.grasyla2.generic.GuardEngine.buildNewComponent ( Class< C >  clComp) throws BadPreCondition [package, virtual]
protected<C> Component<? extends C> metadone.client.grasyla2.generic.GuardEngine.buildNewFalseComponent ( Class< C >  clComp) throws BadPreCondition [package]

Builds a new false component.

Parameters:
<C>The type
clCompThe class
Returns:
The component
Exceptions:
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.

Parameters:
<C>The type
clCompThe class
activeWhether to activate
Returns:
The component
Exceptions:
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.

Parameters:
nameThe name of the attribute
Returns:
true if name is a native attribute

Reimplemented from metadone.client.grasyla2.GrasylaEngine.

References metadone.client.grasyla2.generic.GuardEngine.ATTR_COND.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations