public class Code extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRIORITY |
| Constructor and Description |
|---|
Code()
Construct code definition with random name and default priority.
|
Code(Pattern pattern,
Template template,
String name,
int priority)
Create code definition.
|
Code(String name)
Construct code definition with name and default priority.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPattern(Pattern pattern)
Add a pattern to the list of patterns.
|
boolean |
equals(Object o) |
String |
getName()
Get a code name.
|
Pattern |
getPattern()
Deprecated.
|
List<Pattern> |
getPatterns()
A code contains collection of patterns for parsing.
|
int |
getPriority()
Get the code priority.
|
Template |
getTemplate()
Get template for text generation.
|
int |
hashCode() |
boolean |
hasPatterns()
Check if the code has patterns.
|
boolean |
isTransparent()
If the code is transparent, then all variables which were set on the code processing
will be accessible from other codes from on the same context, the same indentation level.
|
void |
setName(String name)
Set a code name.
|
void |
setPattern(Pattern pattern)
Deprecated.
|
void |
setPatterns(List<Pattern> patterns)
Set the patterns list.
|
void |
setPriority(int priority)
Set the code priority.
|
void |
setTemplate(Template template)
Set template for text generation
|
void |
setTransparent(boolean transparent)
If the code is transparent, then all variables which were set on the code processing
will be accessible from other codes from on the same context, the same indentation level.
|
public static final int DEFAULT_PRIORITY
public Code()
public Code(String name)
name - code namepublic String getName()
public void setName(String name)
name - code namepublic int getPriority()
public void setPriority(int priority)
priority - code prioritypublic List<Pattern> getPatterns()
public void setPatterns(List<Pattern> patterns)
patterns - the list of patternspublic void addPattern(Pattern pattern)
pattern - a patternpublic boolean hasPatterns()
@Deprecated public Pattern getPattern()
@Deprecated public void setPattern(Pattern pattern)
pattern - pattern definition objectpublic Template getTemplate()
public void setTemplate(Template template)
template - template definition objectpublic boolean isTransparent()
public void setTransparent(boolean transparent)
transparent - true for transparentCopyright © 2016. All rights reserved.