src/main/java/com/cedarsoftware/util/io/MetaUtils.java
static Object[] newInstanceEx(Class c)
    {
        try
        {
            Constructor constructor = c.getConstructor(emptyClassArray);
            if (constructor != null)
            {
                return new Object[] {constructor.newInstance(), constructor, true};
            }
            // No empty arg constructor
            return tryOtherConstruction(c);
        }
        catch (Exception e)
        {
            // OK, this class does not have a public no-arg constructor.  Instantiate with
            // first constructor found, filling in constructor values with null or
            // defaults for primitives.
            return tryOtherConstruction(c);
        }
    }
static Object[] newInstanceEx(Class c)
    {
        try
        {
            Constructor constructor = c.getConstructor(emptyClassArray);
            if (constructor != null)
            {
                return new Object[] {constructor.newInstance(), constructor, true};
            }
            // No empty arg constructor
            return tryOtherConstruction(c);
        }
        catch (Exception e)
        {
            // OK, this class does not have a public no-arg constructor.  Instantiate with
            // first constructor found, filling in constructor values with null or
            // defaults for primitives.
            return tryOtherConstruction(c);
        }
    }
static Object [ ] newInstanceEx ( Class c ) { try { Constructor constructor = c . getConstructor ( emptyClassArray ) ; if ( constructor != null ) { return new Object [ ] { constructor . newInstance ( ) , constructor , true } ; } // No empty arg constructor return tryOtherConstruction ( c ) ; } catch ( Exception e ) { // OK, this class does not have a public no-arg constructor.  Instantiate with // first constructor found, filling in constructor values with null or // defaults for primitives. return tryOtherConstruction ( c ) ; } }
Returns an array with the following:
<ol>
<li>object instance</li>
<li>constructor</li>
<li>a Boolean, true if all constructor arguments are to be "null"</li>
</ol>
Returns an array with the following : <ol > <li > object instance< / li > <li > constructor< / li > <li > a Boolean true if all constructor arguments are to be null < / li > < / ol >