Added method for checking lib availability
This commit is contained in:
parent
178f881d57
commit
c339ba8266
1 changed files with 11 additions and 0 deletions
|
|
@ -109,6 +109,17 @@ public class ClassUtil {
|
|||
float.class.isAssignableFrom(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a bool value depending on if the given class is available in the classpath
|
||||
*/
|
||||
public boolean isAvailable(String clazz){
|
||||
try{
|
||||
Class.forName(clazz);
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param field is the field to return the generics from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue