public class TokenContext extends Object
Constructor and Description |
---|
TokenContext(String namePrefix) |
TokenContext(String namePrefix,
TokenContext[] children)
Construct new token-context.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDeclaredTokenIDs()
Add all static-final token-id fields declared
in this token-context using Class.getDeclaredFields() call.
|
protected void |
addTokenID(TokenID tokenID)
Add token-id to the set of token-ids that belong to this context.
|
TokenContextPath[] |
getAllContextPaths()
Get all the context paths for this token-context including
itself as the first one and all its children.
|
TokenContext[] |
getChildren()
Get the children contexts of this context.
|
TokenContextPath |
getContextPath()
Get the context path for this token-context.
|
TokenContextPath |
getContextPath(TokenContextPath childPath)
Get the context path for this token-context that is derived
from the path of one of the children.
|
String |
getNamePrefix()
Get the prefix that this context adds to the name of its tokens.
|
TokenCategory[] |
getTokenCategories()
Get the token-categories that belong to this token-context.
|
TokenID[] |
getTokenIDs()
Get the token-ids that belong to this token-context.
|
public TokenContext(String namePrefix)
public TokenContext(String namePrefix, TokenContext[] children)
namePrefix
- name that will prefix all the token-ids names.children
- child token contexts.public String getNamePrefix()
public TokenContext[] getChildren()
protected void addTokenID(TokenID tokenID)
protected void addDeclaredTokenIDs() throws IllegalAccessException, SecurityException
public TokenID[] getTokenIDs()
public TokenCategory[] getTokenCategories()
public TokenContextPath getContextPath()
public TokenContextPath getContextPath(TokenContextPath childPath)
public TokenContextPath[] getAllContextPaths()