public class ASNodeHandler extends Object implements IASNodeStrategy
IASNodeStrategy that allows a
subclass to either implement the IASNode handling directly or pass a
child IASNodeStrategy that this class will delegate it's
handle(IASNode) method to.BeforeAfterStrategy| Constructor and Description |
|---|
ASNodeHandler()
Constructor, used when this handler directly implements
handle(IASNode) and does not composite a child
IASNodeStrategy. |
ASNodeHandler(IASNodeStrategy handler)
Constructor, creates a node strategy that composites a child
IASNodeStrategy implemented in the handle(IASNode)
method. |
| Modifier and Type | Method and Description |
|---|---|
IASNodeStrategy |
getHandler()
Returns the
IASNodeStrategy currently being used to handle
IASNode AST. |
void |
handle(IASNode node)
The strategy will handle the specific
IASNode. |
void |
setHandler(IASNodeStrategy handler)
Sets the
IASNode handler strategy. |
public ASNodeHandler()
handle(IASNode) and does not composite a child
IASNodeStrategy.public ASNodeHandler(IASNodeStrategy handler)
IASNodeStrategy implemented in the handle(IASNode)
method.handler - The IASNode handler to be used in this strategy.public IASNodeStrategy getHandler()
IASNodeStrategy currently being used to handle
IASNode AST.public void setHandler(IASNodeStrategy handler)
IASNode handler strategy.handler - The IASNodeStrategy to handle the specific
IASNode.public void handle(IASNode node)
IASNodeStrategyIASNode.handle in interface IASNodeStrategynode - The IASNode to handle.Copyright © 2016 The Apache Software Foundation. All rights reserved.