Fields are not "virtual" in java, you must specify "AbstractXMLSource" as declaring class not test_xml
I found that, and fixed it.
One thing that would be really cool though is for BCEL to automatically recognize the type of field access, and make adjustments.
When we write a class, as Java developers we are used to doing this:
class BaseDemo
{
private static final m_name = "Base";
}class DemoClass extends BaseDemo
{
public static void main(String[] main)
{
System.out.println(m_name);
}
}The compiler knows that when I reference "m_name", that the location is in BaseDemo, and not DemoClass. It also knows that the reference is static, and not virtual/normal.
Couldn't InstructionList/InstructionFactory be able to examine the JavaClass for ClassGen to determine which classname the referenced field belongs to, AND what the proper access type is.
That way, instead of having GETFIELD and GETSTATIC, you could just have GETFIELD and it can determine the true bytecode that needs to be written?
I am sure this is a common error that affects alot of new BCEL users.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
