org.peaseplate.internal.designator
Class CompileDirectiveDesignator
java.lang.Object
org.peaseplate.internal.designator.CompileDirectiveDesignator
- All Implemented Interfaces:
- Designator
public class CompileDirectiveDesignator
- extends java.lang.Object
- implements Designator
Field Summary |
static java.lang.String |
NAME
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
CompileDirectiveDesignator
public CompileDirectiveDesignator()
getKeyword
public java.lang.String getKeyword()
- Description copied from interface:
Designator
- Returns the keyword of the designator. The keyword
must be unique within the
TemplateEngine
.
The following characters are allowed: any letter,
any digit, '.', '_', '-' and '/'.
- Specified by:
getKeyword
in interface Designator
- Returns:
- the keyword of the designator, not null
- See Also:
Designator.getKeyword()
isEmpty
public boolean isEmpty()
- Description copied from interface:
Designator
- If this method returns true it indicates that the code fragment
does not contain code and does not need to get compiled
(e.g. ${end}, ${else}, ${break},...).
- Specified by:
isEmpty
in interface Designator
- Returns:
- true if empty, false otherwise
- See Also:
Designator.isEmpty()
isBlockHead
public boolean isBlockHead()
- Specified by:
isBlockHead
in interface Designator
- See Also:
Designator.isBlockHead()
isBlockTail
public boolean isBlockTail()
- Specified by:
isBlockTail
in interface Designator
- See Also:
Designator.isBlockTail()
isExpandableBlock
public boolean isExpandableBlock()
- Specified by:
isExpandableBlock
in interface Designator
- See Also:
Designator.isExpandableBlock()
isBlockExpansion
public boolean isBlockExpansion()
- Specified by:
isBlockExpansion
in interface Designator
- See Also:
Designator.isBlockExpansion()
isVisible
public boolean isVisible()
- Description copied from interface:
Designator
- Returns true if the chunk generated by the designator is visible,
false otherwise. If the chunk can generate visible output,
this method returns true.
A content chunk with only white spaces in it, is by definition
not visible. This method cannot compute this, since is does not get
the source. Handle
ContentDesignator
separately.
- Specified by:
isVisible
in interface Designator
- Returns:
- true if visible, false otherwise
- See Also:
Designator.isVisible()
compile
public Chunk compile(TemplateEngine engine,
CompileContext context,
Token token)
throws TemplateException
- Specified by:
compile
in interface Designator
- Throws:
TemplateException
- See Also:
Designator.compile(org.peaseplate.TemplateEngine, org.peaseplate.internal.model.CompileContext, org.peaseplate.internal.parser.Token)
Copyright © 2008. All Rights Reserved.