Actually I wanted something like:
public class AppPaperTypes extends PPDPaper {
public static AppPaperTypes PLAIN_A4 = new AppPaperTypes("plain", PageFormat.PORTRAIT);
public static AppPaperTypes PLAIN_A4_L = new AppPaperTypes("plain", PageFormat.LANDSCAPE);
public static AppPaperTypes LETTER_HEAD = new AppPaperTypes("LETTER_HEAD", PageFormat.PORTRAIT);
public static AppPaperTypes APP_CERTIFICATE = new AppPaperTypes("CERTIFICATE", PageFormat.PORTRAIT);
private AppPaperType(String media, int orientation) {
super("*PPDTAG", media, 595, 848, orientation);
}
}
but with the possibility of having this "pattern" casted as enum. The nice to have here is the possibility of using the super type for free (i.e. all its methods, etc) instead of adding more verbosity to an already verbose language.
So, why is this forbiden?