|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.g11ntoolkit.tokenizer.JSPTokenizer
Looks for the JSP language elements in a JSP or HTML file and protects them so that SDLX will process them correctly.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
static int |
COMMENT
Indicator of a comment tag. |
private int |
currentPosition
The current position in the string. |
static int |
HTMLTAG
Indicator of an HTML tag. |
protected static java.util.ResourceBundle |
jspVars
JSP variables Resource Bundle. |
private static java.util.logging.Logger |
log
The log used for all messages from this class. |
private int |
maxPosition
The maximum position to begin the search for a tag. |
private static java.util.ResourceBundle |
mrb
Message Resource Bundle. |
static int |
OTHER
Indicator of some other tag. |
static int |
SCRIPT
Indicator of a script tag. |
static int |
SCRIPTTAG
Indicator of a script tag in the txt file. |
private java.lang.String |
str
The string. |
private int |
type
The type of tag found. |
private static java.util.ResourceBundle |
vrb
Variables Resource Bundle. |
| Constructor Summary | |
JSPTokenizer()
Establishes an instance of the class. |
|
JSPTokenizer(java.lang.String astr)
Establishes an instance of the class and processes the string passed to it. |
|
| Method Summary | |
java.lang.String |
getString()
Returns the string save in this object. |
int |
getType()
Returns the type of the tag found. |
boolean |
hasMoreTokens()
Returns true if there could be more tags in the string. |
int[] |
nextCommentToken(java.lang.String cbeg,
java.lang.String cend)
Return the start and end positions of the next comment in the string. |
int[] |
nextImbededTag()
Gets the begin and end positions of the first tag in the string that is inside another tag. |
int[] |
nextJSPTag()
Gets the begin and end positions of the first JSP tag in the string. |
int[] |
nextScriptToken()
Gets the beginning and ending positions of a script tag block in the string. |
java.lang.String |
nextToken()
Gets the next tag in the string. |
int[] |
nextXlAttrTag(java.lang.String elName,
java.lang.String attrName,
int startPos)
Gets the begin and end positions of the first translatable attribute in the string. |
private int |
scanScriptToken(int startPos)
Scans the class string looking for the starting of script tags. |
private int |
scanToken(int startPos)
Scans the class string looking for the starting of comment or script tags. |
void |
setString(java.lang.String astr)
Sets the string and prepares it for detokenizing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.util.logging.Logger log
private static java.util.ResourceBundle mrb
private static java.util.ResourceBundle vrb
protected static java.util.ResourceBundle jspVars
private int currentPosition
private int maxPosition
private java.lang.String str
private int type
public static final int COMMENT
public static final int SCRIPT
public static final int HTMLTAG
public static final int OTHER
public static final int SCRIPTTAG
| Constructor Detail |
public JSPTokenizer()
public JSPTokenizer(java.lang.String astr)
| Method Detail |
public void setString(java.lang.String astr)
getString()public java.lang.String getString()
setString(java.lang.String)private int scanToken(int startPos)
startPos - an int specifying where to start the scan in the class string
private int scanScriptToken(int startPos)
startPos - an int specifying where to start the scan in the class string
public int getType()
The types are represented by integers for each type.
public boolean hasMoreTokens()
public java.lang.String nextToken()
public int[] nextJSPTag()
public int[] nextImbededTag()
public int[] nextXlAttrTag(java.lang.String elName,
java.lang.String attrName,
int startPos)
elName - a String specifying the name of the element that contains the translatable attributeattrName - a String specifying the name of the translatable attributestartPos - an int specifying the position to begin searching
public int[] nextScriptToken()
public int[] nextCommentToken(java.lang.String cbeg,
java.lang.String cend)
cbeg - a String specifying the comment begin stringcend - a String specifying the comment end string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||