< prev index next >

src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java

Print this page
rev 52456 : imported patch asm.additional


 227             result = 37 * result + access;
 228             result = 37 * result + name.hashCode();
 229             result = 37 * result + desc.hashCode();
 230             result = 37 * result + exceptions.hashCode();
 231             return result;
 232         }
 233     }
 234 
 235     private static final class ClassAttributes extends ClassVisitor {
 236         private String name;
 237         private String outerClassName;
 238         private String superName;
 239         private int version;
 240         private int access;
 241         private boolean publicClass;
 242         private boolean nestedClass;
 243         private final Set<Field> fields = new HashSet<>();
 244         private final Set<Method> methods = new HashSet<>();
 245 
 246         public ClassAttributes() {
 247             super(Opcodes.ASM6);
 248         }
 249 
 250         private boolean isPublic(int access) {
 251             return ((access & Opcodes.ACC_PUBLIC) == Opcodes.ACC_PUBLIC)
 252                     || ((access & Opcodes.ACC_PROTECTED) == Opcodes.ACC_PROTECTED);
 253         }
 254 
 255         @Override
 256         public void visit(int version, int access, String name, String signature,
 257                           String superName, String[] interfaces) {
 258             this.version = version;
 259             this.access = access;
 260             this.name = name;
 261             this.nestedClass = name.contains("$");
 262             this.superName = superName;
 263             this.publicClass = isPublic(access);
 264         }
 265 
 266         @Override
 267         public void visitOuterClass(String owner, String name, String desc) {




 227             result = 37 * result + access;
 228             result = 37 * result + name.hashCode();
 229             result = 37 * result + desc.hashCode();
 230             result = 37 * result + exceptions.hashCode();
 231             return result;
 232         }
 233     }
 234 
 235     private static final class ClassAttributes extends ClassVisitor {
 236         private String name;
 237         private String outerClassName;
 238         private String superName;
 239         private int version;
 240         private int access;
 241         private boolean publicClass;
 242         private boolean nestedClass;
 243         private final Set<Field> fields = new HashSet<>();
 244         private final Set<Method> methods = new HashSet<>();
 245 
 246         public ClassAttributes() {
 247             super(Opcodes.ASM7);
 248         }
 249 
 250         private boolean isPublic(int access) {
 251             return ((access & Opcodes.ACC_PUBLIC) == Opcodes.ACC_PUBLIC)
 252                     || ((access & Opcodes.ACC_PROTECTED) == Opcodes.ACC_PROTECTED);
 253         }
 254 
 255         @Override
 256         public void visit(int version, int access, String name, String signature,
 257                           String superName, String[] interfaces) {
 258             this.version = version;
 259             this.access = access;
 260             this.name = name;
 261             this.nestedClass = name.contains("$");
 262             this.superName = superName;
 263             this.publicClass = isPublic(access);
 264         }
 265 
 266         @Override
 267         public void visitOuterClass(String owner, String name, String desc) {


< prev index next >