Say I have an abstract class as follows:

public abstract class Foo {
String myField = "DefaultValue";
}

Note that the field is not static. How can I obtain the default value of the 
field, namely "DefaultValue", without having a concrete class that I can 
instantiate?

Using plain vanilla reflection, there doesn't appear to be a way, since the 
only way to get the value of a non-static field is to have an instance of 
the class. So I was hoping there might be a way to do this with BCEL, but I 
couldn't find anything there either.

Anyone have any ideas?

--
Martin Cooper

Reply via email to