src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java

Print this page




 222         svuidMethods = new ArrayList<Item>();
 223     }
 224 
 225     // ------------------------------------------------------------------------
 226     // Overridden methods
 227     // ------------------------------------------------------------------------
 228 
 229     /*
 230      * Visit class header and get class name, access , and interfaces
 231      * information (step 1,2, and 3) for SVUID computation.
 232      */
 233     @Override
 234     public void visit(final int version, final int access, final String name,
 235             final String signature, final String superName,
 236             final String[] interfaces) {
 237         computeSVUID = (access & Opcodes.ACC_INTERFACE) == 0;
 238 
 239         if (computeSVUID) {
 240             this.name = name;
 241             this.access = access;
 242             this.interfaces = Arrays.copyOf(interfaces, interfaces.length);


 243         }
 244 
 245         super.visit(version, access, name, signature, superName, interfaces);
 246     }
 247 
 248     /*
 249      * Visit the methods and get constructor and method information (step 5 and
 250      * 7). Also determine if there is a class initializer (step 6).
 251      */
 252     @Override
 253     public MethodVisitor visitMethod(final int access, final String name,
 254             final String desc, final String signature, final String[] exceptions) {
 255         if (computeSVUID) {
 256             if ("<clinit>".equals(name)) {
 257                 hasStaticInitializer = true;
 258             }
 259             /*
 260              * Remembers non private constructors and methods for SVUID
 261              * computation For constructor and method modifiers, only the
 262              * ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL,




 222         svuidMethods = new ArrayList<Item>();
 223     }
 224 
 225     // ------------------------------------------------------------------------
 226     // Overridden methods
 227     // ------------------------------------------------------------------------
 228 
 229     /*
 230      * Visit class header and get class name, access , and interfaces
 231      * information (step 1,2, and 3) for SVUID computation.
 232      */
 233     @Override
 234     public void visit(final int version, final int access, final String name,
 235             final String signature, final String superName,
 236             final String[] interfaces) {
 237         computeSVUID = (access & Opcodes.ACC_INTERFACE) == 0;
 238 
 239         if (computeSVUID) {
 240             this.name = name;
 241             this.access = access;
 242             this.interfaces = new String[interfaces.length];
 243             System.arraycopy(interfaces, 0, this.interfaces, 0,
 244                     interfaces.length);
 245         }
 246 
 247         super.visit(version, access, name, signature, superName, interfaces);
 248     }
 249 
 250     /*
 251      * Visit the methods and get constructor and method information (step 5 and
 252      * 7). Also determine if there is a class initializer (step 6).
 253      */
 254     @Override
 255     public MethodVisitor visitMethod(final int access, final String name,
 256             final String desc, final String signature, final String[] exceptions) {
 257         if (computeSVUID) {
 258             if ("<clinit>".equals(name)) {
 259                 hasStaticInitializer = true;
 260             }
 261             /*
 262              * Remembers non private constructors and methods for SVUID
 263              * computation For constructor and method modifiers, only the
 264              * ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL,