|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.array.AOOValid
Ensure an array of objects is valid, according to the rules existing in an AOOVConfig. See AOOVConfig.
Source code: AOOValid.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
AOOValid()
Create a completely unrestricted AOOValid. |
|
AOOValid(AOOVConfig aoov_config)
Create an AOOValid. |
Method Summary | |
void |
crashIfBad(Object[] a_object)
If the provided object array is invalid, throw a descriptive error message. |
void |
crashIfBad(String s_callingClsFnc,
String s_varName,
Object[] a_object)
If the provided object array is invalid, throw a descriptive error message. |
protected void |
declareNoViolation()
When extending the isValid function, you must call this immediately before your function returns true. |
AOOVConfig |
getAOOVConfig()
Get the AOOVConfig for direct manipulation. |
boolean |
isValid(Object[] a_object)
Is the provided array of objects legal according to the rules existing in the AOOVConfig? |
boolean |
isValid(String s_callingClsFnc,
String s_varName,
Object[] a_object)
Is the provided array of objects legal according to the rules existing in the AOOVConfig? |
protected void |
throwAXBad(String s_callingClsFnc,
String s_varName,
String s_currently)
Used internally, by isValid. |
boolean |
wasValidated()
Was the object array validated? |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AOOValid()
Create a completely unrestricted AOOValid.
Equal to AOOValid(new AOOVConfig())
public AOOValid(AOOVConfig aoov_config)
Create an AOOValid.
aoov_config
- The configuration defining "valid". May not be null.Method Detail |
public final boolean wasValidated()
Was the object array validated?
protected final void declareNoViolation()
When extending the isValid function, you must call this immediately before your function returns true.
public final AOOVConfig getAOOVConfig()
Get the AOOVConfig for direct manipulation.
public boolean isValid(Object[] a_object)
Is the provided array of objects legal according to the rules existing in the AOOVConfig?
isValid(null, null, a_object)
public boolean isValid(String s_callingClsFnc, String s_varName, Object[] a_object)
Is the provided array of objects legal according to the rules existing in the AOOVConfig?
s_callingClsFnc
- The name of the class-dot-function for use in potential error messages only. This is the place where the error message should appear that it was generated from. For example: xbn.array.primitive.PrimitiveArrayChar.crashIfInvalid
.s_varName
- The descriptive name of the char array, for potential error messages only.a_object
- The object array to analyze.public final void crashIfBad(Object[] a_object)
If the provided object array is invalid, throw a descriptive error message.
Equal to crashIfBad("xbn.array.AOOValid", "a_object", a_object)
public final void crashIfBad(String s_callingClsFnc, String s_varName, Object[] a_object)
If the provided object array is invalid, throw a descriptive error message.
Equal to isValid(s_callingClsFnc, s_varName, a_object)
(supressing the error message)
Note that before isValid is called, both s_callingClsFnc and s_varName are validated to be both non-null and at least one character in length.
protected final void throwAXBad(String s_callingClsFnc, String s_varName, String s_currently)
Used internally, by isValid. See the code for isValid.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava