public void add ( final Class < ? > type , final String name ) throws ClassNotFoundException { FieldGen fg ; if ( result != null ) { throw new IllegalStateException ( "Class already generated" ) ; } fg = new FieldGen ( Constants . ACC_PUBLIC | Constants . ACC_SUPER , Type . getType ( type ) , name , cg . getConstantPool ( ) ) ; cg . addField ( fg . getField ( ) ) ; }
Adds a public field to the constructed class .