Class ClassEnforcer


  • public class ClassEnforcer
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean assertNotInstantiable​(java.lang.Class<?> cls)
      Verify cls is not instantiable with default constructor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • assertNotInstantiable

        public static boolean assertNotInstantiable​(java.lang.Class<?> cls)
                                             throws java.lang.ReflectiveOperationException
        Verify cls is not instantiable with default constructor.
        Parameters:
        cls - the class to verify
        Throws:
        java.lang.ReflectiveOperationException - if cls does not have a default constructor
        java.lang.AssertionError - if