public final class Validate extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
archiveHasExpectedFileExtension(org.jboss.shrinkwrap.api.Archive<?> archive) |
static void |
configurationDirectoryExists(String string,
String message)
Checks that string is not null and not empty and it represents a path to a valid directory
|
static String |
getArchiveExpression(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type) |
static boolean |
isArchiveOfType(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type,
org.jboss.shrinkwrap.api.Archive<?> archive) |
static void |
notNull(Object obj,
String message)
Checks that object is not null, throws exception if it is.
|
static void |
notNullOrEmpty(String string,
String message)
Checks that the specified String is not null or empty,
throws exception if it is.
|
static void |
stateNotNull(Object obj,
String message)
Checks that obj is not null, throws exception if it is.
|
public static String getArchiveExpression(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type)
public static boolean archiveHasExpectedFileExtension(org.jboss.shrinkwrap.api.Archive<?> archive)
public static boolean isArchiveOfType(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type, org.jboss.shrinkwrap.api.Archive<?> archive)
public static void notNull(Object obj, String message) throws IllegalArgumentException
obj
- The object to checkmessage
- The exception messageIllegalArgumentException
- Thrown if obj is nullpublic static void notNullOrEmpty(String string, String message) throws IllegalArgumentException
string
- The object to checkmessage
- The exception messageIllegalArgumentException
- Thrown if obj is nullpublic static void stateNotNull(Object obj, String message) throws IllegalStateException
obj
- The object to checkmessage
- The exception messageIllegalStateException
- Thrown if obj is nullpublic static void configurationDirectoryExists(String string, String message) throws ConfigurationException
string
- The path to checkmessage
- The exception messageConfigurationException
- Thrown if string is empty, null or it does not represent a path the a valid directoryCopyright © 2014 JBoss by Red Hat. All rights reserved.