private static Object parseInstance( String value, Function<String, String> resolver, List<ClassLoader> addonClassLoaders ) {
		return (LazyValue) t -> {
			try {
				if( value.indexOf( ',' ) >= 0 ) {
					// Syntax: className,param1,param2,...
					List<String> parts = splitFunctionParams( value, ',' );
					String className = parts.get( 0 );
					Class<?> cls = findClass( className, addonClassLoaders );

					Constructor<?>[] constructors = cls.getDeclaredConstructors();
					Object result = invokeConstructorOrStaticMethod( constructors, parts, resolver );
					if( result != null )
						return result;

					LoggingFacade.INSTANCE.logSevere( "FlatLaf: Failed to instantiate '" + className
						+ "': no constructor found for parameters '"
						+ value.substring( value.indexOf( ',' + 1 ) ) + "'.", null );
					return null;
				} else
					return findClass( value, addonClassLoaders ).getDeclaredConstructor().newInstance();
			} catch( Exception ex ) {
				LoggingFacade.INSTANCE.logSevere( "FlatLaf: Failed to instantiate '" + value + "'.", ex );
				return null;
			}
		};
	}
@Test
	void parseInstance() {
		String className = TestInstance.class.getName();
		assertEquals( new TestInstance(), ((LazyValue)UIDefaultsLoader.parseValue( "dummyIcon", className, null )).createValue( null ) );
		assertInstanceEquals( new TestInstance(), null );
		assertInstanceEquals( new TestInstance( "some string" ), "some string" );
		assertInstanceEquals( new TestInstance( false ), "false" );
		assertInstanceEquals( new TestInstance( true ), "true" );
		assertInstanceEquals( new TestInstance( 123 ), "123" );
		assertInstanceEquals( new TestInstance( 123.456f ), "123.456" );
		assertInstanceEquals( new TestInstance( Color.red ), "#f00" );
		assertInstanceEquals( new TestInstance( "some string", true ), "some string, true" );
		assertInstanceEquals( new TestInstance( "some string", true, 123 ), "some string, true, 123" );
		assertInstanceEquals( new TestInstance( "some string", 123, true ), "some string, 123, true" );
		assertInstanceEquals( new TestInstance( "some string", 123.456f, true ), "some string, 123.456, true" );
		assertInstanceEquals( new TestInstance( 123, "some string" ), "123, some string" );
	}