Skip to content

Instantly share code, notes, and snippets.

@contextfw
contextfw / gist:883737
Created March 23, 2011 19:09
Idea for dynamic domain model in Java
public interface Struct {
<T> T get(FieldType<T> type);
<T> void set(FieldType<T> type, T value);
}
///////////////////////////////////////
public interface FieldType<T> {
String getFieldName();
Class<T> getType();