@SuppressWarnings ("unchecked" )
    public ReflectObject( Class<?> type )
    {
        Constructor<?> calculatedConstructor = null;
        Field[] calculateFields = null;
        Reflect<Object>[] calculatedReflects = null;
        int calculatedMaxSize = 0;
        
        try
        {
            calculatedConstructor = type.getConstructor();
            calculateFields = getFields( type );
            calculatedReflects = new Reflect[calculateFields.length];   
            
            for (int i = 0; i < calculateFields.length; i++)
            {
                Reflect<Object> r = ReflectFactory.create( calculateFields[i].getType() );
                
                if (r == null)
                {
                    throw new Exception( "Reflect missing for field " + calculateFields[i].getName() + " with type " + calculateFields[i].getType() );
                }
                
                calculatedReflects[i] = r;
                
                if (calculatedMaxSize != -1)
                {
                    if (r.maxSize() == -1)
                    {
                        calculatedMaxSize = -1;
                    }
                    else
                    {
                        calculatedMaxSize += r.maxSize();
                    }
                }
            }
        }
        catch (Exception e)
        {
            throw new RuntimeException( e );
        }
        
        this.type = type;
        this.constructor = calculatedConstructor;
        this.fields = calculateFields;
        this.reflects = calculatedReflects;
        this.maxSize = calculatedMaxSize;
    }