public class Context extends Object
| Constructor and Description |
|---|
Context()
Default constructor
|
Context(Context parent)
Constructor of child-context
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBadTag(int offset)
Add the bag tag position
|
boolean |
checkBadTag(int offset)
Check the bag tag
|
void |
checkNesting()
Check nesting.
|
Object |
getAttribute(String name)
Get the context attribute.
|
Map<String,CharSequence> |
getAttributes() |
Object |
getLocalAttribute(String name)
Return attribute from this context, not parent
|
ProcScope |
getScope() |
Source |
getSource() |
Appendable |
getTarget() |
ProcPatternElement |
getTerminator()
get Text terminator,this mark stop text processing
|
boolean |
hasNextAdjustedForTerminator()
Check has chars in source before terminator or not
|
void |
mergeWithParent()
Put all local attributes to parent context
|
void |
setAttribute(String name,
CharSequence value)
Add or set context attribute
|
void |
setNestingLimit(int nestingLimit)
Set nesting limit for this context.
|
void |
setScope(ProcScope scope)
Set list of codes in current context
|
void |
setSource(Source source) |
void |
setTarget(Appendable target) |
void |
setTerminator(ProcPatternElement terminator) |
public Context()
public Context(Context parent)
parent - parent contextpublic void addBadTag(int offset)
offset - offset of bad tag in sourcepublic boolean checkBadTag(int offset)
offset - offset of tagpublic boolean hasNextAdjustedForTerminator()
public void mergeWithParent()
public void setAttribute(String name, CharSequence value)
name - attribute namevalue - attribute valuepublic Object getAttribute(String name)
name - attribute namepublic Object getLocalAttribute(String name)
name - attribute namepublic void setScope(ProcScope scope)
scope - code scopepublic Source getSource()
public void setSource(Source source)
public Appendable getTarget()
public void setTarget(Appendable target)
public ProcPatternElement getTerminator()
public void setTerminator(ProcPatternElement terminator)
terminator - Text terminator,this mark stop text processingpublic ProcScope getScope()
public void setNestingLimit(int nestingLimit)
nestingLimit - nesting limitpublic void checkNesting()
throws org.kefirsf.bb.proc.NestingException
NestingException - if nesting limit less than 0.public Map<String,CharSequence> getAttributes()
Copyright © 2016. All rights reserved.