public class REProgram
extends java.lang.Object
implements java.io.Serializable
RE
,
RECompiler
,
Serialized FormModifier and Type | Field and Description |
---|---|
(package private) int |
flags |
(package private) char[] |
instruction |
(package private) int |
lenInstruction |
(package private) int |
maxParens |
(package private) static int |
OPT_HASBACKREFS |
(package private) static int |
OPT_HASBOL |
(package private) char[] |
prefix |
Constructor and Description |
---|
REProgram(char[] instruction)
Constructs a program object from a character array
|
REProgram(char[] instruction,
int lenInstruction)
Constructs a program object from a character array
|
REProgram(int parens,
char[] instruction)
Constructs a program object from a character array
|
Modifier and Type | Method and Description |
---|---|
char[] |
getInstructions()
Returns a copy of the current regular expression program in a character
array that is exactly the right length to hold the program.
|
char[] |
getPrefix()
Returns a copy of the prefix of current regular expression program
in a character array.
|
void |
setInstructions(char[] instruction,
int lenInstruction)
Sets a new regular expression program to run.
|
static final int OPT_HASBACKREFS
static final int OPT_HASBOL
char[] instruction
int lenInstruction
char[] prefix
int flags
int maxParens
public REProgram(char[] instruction)
instruction
- Character array with RE opcode instructions in itpublic REProgram(int parens, char[] instruction)
parens
- Count of parens in the programinstruction
- Character array with RE opcode instructions in itpublic REProgram(char[] instruction, int lenInstruction)
instruction
- Character array with RE opcode instructions in itlenInstruction
- Amount of instruction array in usepublic char[] getInstructions()
public void setInstructions(char[] instruction, int lenInstruction)
instruction
- Program instruction bufferlenInstruction
- Length of instruction buffer in usepublic char[] getPrefix()
getPrefix
will return null.Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.