public String getSuperclassName(final ClassFile cls) { return cls.getSuperclass(); }
public String getSuperclassName(final ClassFile cls) { return cls.getSuperclass(); }
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
private String getSuperclassName() { ClassFile cf = declaringClass.getClassFile2(); return cf.getSuperclass(); }
@Override public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; return classPool.get(supername); }
private String getSuperclassName() { ClassFile cf = declaringClass.getClassFile2(); return cf.getSuperclass(); }
private ConstPool compact0() { ConstPool cp = new ConstPool(thisclassname); thisClass = cp.getThisClassInfo(); String sc = getSuperclass(); if (sc != null) superClass = cp.addClassInfo(getSuperclass()); if (interfaces != null) { int n = interfaces.length; for (int i = 0; i < n; ++i) interfaces[i] = cp.addClassInfo(constPool.getClassInfo(interfaces[i])); } return cp; }
public boolean subtypeOf(CtClass clazz) throws NotFoundException { int i; String cname = clazz.getName(); if (this == clazz || getName().equals(cname)) return true; ClassFile file = getClassFile2(); String supername = file.getSuperclass(); if (supername != null && supername.equals(cname)) return true; String[] ifs = file.getInterfaces(); int num = ifs.length; for (i = 0; i < num; ++i) if (ifs[i].equals(cname)) return true; if (supername != null && classPool.get(supername).subtypeOf(clazz)) return true; for (i = 0; i < num; ++i) if (classPool.get(ifs[i]).subtypeOf(clazz)) return true; return false; }
private ConstPool compact0() { ConstPool cp = new ConstPool(thisclassname); thisClass = cp.getThisClassInfo(); String sc = getSuperclass(); if (sc != null) superClass = cp.addClassInfo(getSuperclass()); if (interfaces != null) for (int i = 0; i < interfaces.length; ++i) interfaces[i] = cp.addClassInfo(constPool.getClassInfo(interfaces[i])); return cp; }
@Override public boolean subtypeOf(CtClass clazz) throws NotFoundException { int i; String cname = clazz.getName(); if (this == clazz || getName().equals(cname)) return true; ClassFile file = getClassFile2(); String supername = file.getSuperclass(); if (supername != null && supername.equals(cname)) return true; String[] ifs = file.getInterfaces(); int num = ifs.length; for (i = 0; i < num; ++i) if (ifs[i].equals(cname)) return true; if (supername != null && classPool.get(supername).subtypeOf(clazz)) return true; for (i = 0; i < num; ++i) if (classPool.get(ifs[i]).subtypeOf(clazz)) return true; return false; }
@Override public void scan(final Object cls) { final ClassFile classFile = (ClassFile)cls; String className = classFile.getName(); String superclass = classFile.getSuperclass(); boolean isAbstract = (classFile.getAccessFlags() & (AccessFlag.INTERFACE | AccessFlag.ABSTRACT)) != 0; ChildClassDescriptor scannedClass = new ChildClassDescriptor(className, isAbstract); if (!superclass.equals(Object.class.getName())) { children.put(superclass, scannedClass); } for (String anInterface : classFile.getInterfaces()) { children.put(anInterface, scannedClass); } }
+ " modifiers: " + Integer.toHexString(cf.getAccessFlags())); out.println(Modifier.toString(mod) + " class " + cf.getName() + " extends " + cf.getSuperclass());
+ " modifiers: " + Integer.toHexString(cf.getAccessFlags())); out.println(Modifier.toString(mod) + " class " + cf.getName() + " extends " + cf.getSuperclass());
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
private String getSuperclassName() { ClassFile cf = declaringClass.getClassFile2(); return cf.getSuperclass(); }
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
public CtClass getSuperclass() throws NotFoundException { String supername = getClassFile2().getSuperclass(); if (supername == null) return null; else return classPool.get(supername); }
private void debugClassFile(final ClassFile classFile) { if (!logger.isDebugEnabled()) { return; } logger.debug(" - class: {}",classFile.getName()); logger.debug(" -- Java version: {}.{}", classFile.getMajorVersion(), classFile.getMinorVersion()); logger.debug(" -- interface: {} abstract: {} final: {}", classFile.isInterface(), classFile.isAbstract(), classFile.isFinal()); logger.debug(" -- extends class: {}",classFile.getSuperclass()); logger.debug(" -- implements interfaces: {}", Arrays.deepToString(classFile.getInterfaces())); }