fitgoodies-db-jdbc/src/main/java/de/cologneintelligence/fitgoodies/database/dynamic/DynamicObjectFactory.java
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());
	}
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.

@param type type of the field
@param name name of the field
@throws ClassNotFoundException indicates a problem with {@code type}