|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.bmrb.starlibj.StarValidity
This is a set of some simple utility methods that are used throughout the starlibj. Mostly they deal with string syntax checks. These routines are used by the starlibj functions to decide if certain operations should be rejected. (For example, deciding if a string is an acceptable saveframe name or tagname.) They are left public so that the caller of this package/library can use them too.
Constructor Summary | |
StarValidity()
|
Method Summary | |
static boolean |
isValidBlockName(java.lang.String s)
Returns true if the string is a valid data/global block name. |
static boolean |
isValidForDelim(java.lang.String s,
int delim)
Determines if the string given is valid for the delimiter type given (from DataValueNode). |
static boolean |
isValidSaveName(java.lang.String s)
Returns true if the string is a valid saveframe name. |
static boolean |
isValidTagName(java.lang.String s)
Returns true if the string is a valid tag name. |
static boolean |
isValidValueForDoubleDelim(java.lang.String s)
Returns true if the string given is valid for a double-quote delimiter in a DataValueNode. |
static boolean |
isValidValueForFrameCodeDelim(java.lang.String s)
Returns true if the string given is valid for a framecode delimiter (dollar sign) in a DataValueNode, |
static boolean |
isValidValueForNonDelim(java.lang.String s)
Returns true if the string given is valid for a nondelimited DataValueNode (no whitespace). |
static boolean |
isValidValueForSingleDelim(java.lang.String s)
Returns true if the string given is valid for a single-quote delimiter in a DataValueNode. |
static ParseValFromRetVal |
parseValFrom(java.lang.String str,
boolean makeNew)
Given a string, parse (starting at the first char and extending until valid syntax is exhausted) a value string in STAR syntax. |
static java.lang.String |
pkgName()
Returns the String name of this package. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StarValidity()
Method Detail |
public static java.lang.String pkgName()
Class.forName("Vector")... // (won't work)You have to say:
Class.forName("java.lang.Vector")...
public static boolean isValidTagName(java.lang.String s)
public static boolean isValidSaveName(java.lang.String s)
public static boolean isValidBlockName(java.lang.String s)
public static boolean isValidValueForNonDelim(java.lang.String s)
public static boolean isValidValueForSingleDelim(java.lang.String s)
public static boolean isValidValueForDoubleDelim(java.lang.String s)
public static boolean isValidValueForFrameCodeDelim(java.lang.String s)
public static boolean isValidForDelim(java.lang.String s, int delim)
DataValueNode
public static ParseValFromRetVal parseValFrom(java.lang.String str, boolean makeNew)
str
- the string to parse through.makeNew
- set to true to return a new String, false not to.
Setting it to false is useful when you want to
parse for the end of the string, but you don't
care what the string is (you are skipping past
the value.)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |