2009-03-31 07:20:55 +08:00
|
|
|
package org.broadinstitute.sting.utils;
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Modifier;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by IntelliJ IDEA.
|
|
|
|
|
* User: hanna
|
|
|
|
|
* Date: Mar 30, 2009
|
|
|
|
|
* Time: 5:38:05 PM
|
|
|
|
|
*
|
|
|
|
|
* A set of static utility methods for determining information about this runtime environment.
|
|
|
|
|
* Introspects classes, loads jars, etc.
|
|
|
|
|
*/
|
|
|
|
|
public class JVMUtils {
|
|
|
|
|
/**
|
|
|
|
|
* Constructor access disallowed...static utility methods only!
|
|
|
|
|
*/
|
|
|
|
|
private JVMUtils() { }
|
|
|
|
|
|
|
|
|
|
/**
|
2009-05-28 09:35:49 +08:00
|
|
|
* Is the specified class a concrete implementation of baseClass?
|
|
|
|
|
* @param clazz Class to check.
|
2009-07-22 02:32:22 +08:00
|
|
|
* @return True if clazz is concrete. False otherwise.
|
2009-03-31 07:20:55 +08:00
|
|
|
*/
|
2009-07-22 02:32:22 +08:00
|
|
|
public static boolean isConcrete( Class clazz ) {
|
|
|
|
|
return !Modifier.isAbstract(clazz.getModifiers()) &&
|
|
|
|
|
!Modifier.isInterface(clazz.getModifiers());
|
2009-03-31 07:20:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|