protected IndexedJavaClassDescriptor addToStoredClassDescriptors(Class<?> clazz) {
        final String name = JavaClassDescriptor.getClassName(clazz);

        if (debug) debug("addToStoredClassDescriptors(clazz=", clazz, ")");

        if (storedClassDescriptors.containsKey(name))
            throw new RuntimeException(
            	"Descriptor of \"" + name + "\" is already stored at index: " +
            	getFromStoredClassDescriptors(clazz).getIndex()
            );

        // find custom class descriptor and instantiate if any
        JavaClassDescriptor desc = null;

/*
        Class<? extends JavaClassDescriptor> descriptorType
        	= context.getGraniteConfig().getJavaDescriptor(clazz.getName());
        if (descriptorType != null) {
            Class<?>[] argsDef = new Class[]{Class.class};
            Object[] argsVal = new Object[]{clazz};
            try {
                desc = ClassUtil.newInstance(descriptorType, argsDef, argsVal);
            } catch (Exception e) {
                throw new RuntimeException("Could not instantiate Java descriptor: " + descriptorType);
            }
        }
*/

        if (desc == null)
            desc = new DefaultJavaClassDescriptor(clazz);

        IndexedJavaClassDescriptor iDesc = new IndexedJavaClassDescriptor(storedClassDescriptors.size(), desc);

        if (debug) debug("addToStoredClassDescriptors() - putting: name=", name, ", iDesc=", iDesc);

        storedClassDescriptors.put(name, iDesc);

        return iDesc;
    }