diff -r 22872b24d38c -r ed989c347b3c src/share/classes/com/sun/tools/javap/ClassWriter.java --- a/src/share/classes/com/sun/tools/javap/ClassWriter.java Tue Jun 16 10:46:37 2009 +0100 +++ b/src/share/classes/com/sun/tools/javap/ClassWriter.java Fri Jun 19 11:40:47 2009 -0700 @@ -93,17 +93,25 @@ this.lastModified = lastModified; } - ClassFile getClassFile() { + protected ClassFile getClassFile() { return classFile; } - Method getMethod() { + protected void setClassFile(ClassFile cf) { + classFile = cf; + constant_pool = classFile.constant_pool; + } + + protected Method getMethod() { return method; } + protected void setMethod(Method m) { + method = m; + } + public void write(ClassFile cf) { - classFile = cf; - constant_pool = classFile.constant_pool; + setClassFile(cf); if ((options.sysInfo || options.verbose) && !options.compat) { if (uri != null) { @@ -197,13 +205,13 @@ println(); } - void writeFields() { + protected void writeFields() { for (Field f: classFile.fields) { writeField(f); } } - void writeField(Field f) { + protected void writeField(Field f) { if (!options.checkAccess(f.access_flags)) return; @@ -259,12 +267,12 @@ println(); } - void writeMethods() { + protected void writeMethods() { for (Method m: classFile.methods) writeMethod(m); } - void writeMethod(Method m) { + protected void writeMethod(Method m) { if (!options.checkAccess(m.access_flags)) return;