for(com.sun.org.apache.bcel.internal.classfile.Field fld: fields) {
final boolean isStatic = (fld.getModifiers() & Modifier.STATIC) != 0;
final boolean isFinal = (fld.getModifiers() & Modifier.FINAL) != 0;
StubResolver fldstub = new SimpleResolver(new TypeName(fld.getType().toString())) ;
if (isStatic && isFinal) {
ConstantValue cv = fld.getConstantValue();
Object o ;
if (cv != null) {
Constant c = cv.getConstantPool().getConstant(cv.getConstantValueIndex());
if (c instanceof ConstantObject) {
o = ((ConstantObject)c).getConstantValue(cv.getConstantPool()) ;
try {
o = StdJavaExpressions.cast( this, fldstub, new ConstObj(o)) ;
} catch (CompilerException e) {
o = null ;
}