public class Hierarchy extends Object
| Constructor and Description |
|---|
Hierarchy(PebbleTemplateImpl currentTemplate)
Constructs an inheritance chain with one known template.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ascend()
Signifies that the parent template in the hierarchy is now being evaluated so it should be
considered the "current" template.
|
void |
descend()
Signifies that the child template in the hierarchy is now being evaluated so i t should be
considered the "current" template.
|
PebbleTemplateImpl |
getChild()
Returns the child of the template currently being evaluated or null if there is no child.
|
PebbleTemplateImpl |
getParent()
Returns the parent of the template currently being evaluated or null if there is no parent.
|
void |
pushAncestor(PebbleTemplateImpl ancestor)
Adds a known ancestor onto the inheritance chain, does not increment which template is the
"current" template being evaluated.
|
public Hierarchy(PebbleTemplateImpl currentTemplate)
currentTemplate - The current templatepublic void pushAncestor(PebbleTemplateImpl ancestor)
ancestor - The ancestor templatepublic void ascend()
public void descend()
public PebbleTemplateImpl getChild()
public PebbleTemplateImpl getParent()
Copyright © 2018. All rights reserved.