Okay so here is a skeleton:
// this takes care of the creation of Value object
public class ValueFactory{
public static ValueFactory getFactory(Proc){
// check cache and return a ValueFactory
}
private ValueFactory(Proc proc){
}
public Value getValue(String name, Frame currentFrame){
...
}
public Value getValue(DwarfDie die){
... }
}
// this is just speculation but can be put either in Value it self or
in a ValuePrint object
...
public String printValue(Value value){
}
...
How well will the above work for hpd, stack examination, source
window, DisplayVariable, an any other interested parties :)
Sami