|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.core.Pstring
public class Pstring
This class is for working with the text of Proparse's QSTRING nodes. Proparse's QSTRING nodes contain the string literal, including the delimiting quotation marks as well as any string attributes. This class will allow us to easily fetch and work with things like just the text portion, just the attributes portion, check if the delimiting quotes are single-quotes or double-quotes, etc.
Constructor Summary | |
---|---|
Pstring(java.lang.String quotedString)
Constructor - should generally only be constructed by passing in the results of parser.getNodeText() |
Method Summary | |
---|---|
static java.lang.String |
dequote(java.lang.String orig)
Strip attributes and quotes, if quoted. |
java.lang.String |
getAttributes()
Get the string attributes, including the colon. |
char |
getQuote()
Get the character quotation mark. |
java.lang.String |
getText()
Same as justText - get the text stripped of quotes and attributes. |
static boolean |
isQuoted(java.lang.String checkMe)
Convenience method to check if the first character of a String is a quote character. |
boolean |
isTrans()
Is this string translatable? |
java.lang.String |
justText()
Just the text portion of the node's text - er - you know. |
void |
setAttributes(java.lang.String attributes)
|
void |
setQuote(char quote)
|
void |
setText(java.lang.String text)
Set the text portion - the stuff in between the quotation marks. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Pstring(java.lang.String quotedString)
Method Detail |
---|
public static java.lang.String dequote(java.lang.String orig)
public java.lang.String getAttributes()
public char getQuote()
public java.lang.String getText()
public static boolean isQuoted(java.lang.String checkMe)
public boolean isTrans()
public java.lang.String justText()
public void setAttributes(java.lang.String attributes)
public void setQuote(char quote)
public void setText(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |