java.lang.NoSuchMethodException

I'm getting an error when getting a constructor with 4 integers. The method itself essentially exists but Java throws an exception
ColorType type;
try {
    Constructor<ColorType> c =ColorType.class.getConstructor(Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
    c.setAccessible(true);
    type = c.newInstance(255, 0, 0, 0);
} catch (NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) {
    throw new RuntimeException(e);
}
        
settings.background_color = type;
image.png
Was this page helpful?