public static<T> T newInstance( Class<T> clazz ){
return newInstance(clazz, getDefaultInterceptor(clazz));
}
public static<T> T newInstance( Class<T> clazz, MethodInterceptor interceptor, Map<String, Object> prototype ){
PropertyAccessor instance = (PropertyAccessor) newInstance(clazz, interceptor);
for (String propertyName : ReflectionTools.getPropertiesOfGetters((Class<?>)clazz))
instance.set(propertyName, prototype.get(propertyName));
return (T) instance;
}