|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectoauthP5.oauth.Preconditions
public class Preconditions
Utils for checking preconditions and invariants
Constructor Summary | |
---|---|
Preconditions()
|
Method Summary | |
---|---|
static void |
checkEmptyString(String string,
String errorMsg)
Checks that a string is not null or empty |
static void |
checkNotNull(Object object,
String errorMsg)
Checks that an object is not null. |
static void |
checkValidOAuthCallback(String url,
String errorMsg)
Checks that a URL is a valid OAuth callback |
static void |
checkValidUrl(String url,
String errorMsg)
Checks that a URL is valid |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Preconditions()
Method Detail |
---|
public static void checkNotNull(Object object, String errorMsg)
object
- any objecterrorMsg
- error message
IllegalArgumentException
- if the object is nullpublic static void checkEmptyString(String string, String errorMsg)
string
- any stringerrorMsg
- error message
IllegalArgumentException
- if the string is null or emptypublic static void checkValidUrl(String url, String errorMsg)
url
- any stringerrorMsg
- error messagepublic static void checkValidOAuthCallback(String url, String errorMsg)
url
- any stringerrorMsg
- error message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |