@Override public AnnotatedObject getContainingScope() { // TODO Auto-generated method stub return AnalysisContext.currentXFactory().getXClass( DescriptorFactory.createClassDescriptorFromDottedClassName(getClassName())); }
private ClassVertex optionallyResolveClassVertex(ClassDescriptor classDescriptor) { ClassVertex typeVertex = classDescriptorToVertexMap.get(classDescriptor); if (typeVertex == null) { // We have never tried to resolve this ClassVertex before. // Try to find the XClass for this class. XClass xclass = AnalysisContext.currentXFactory().getXClass(classDescriptor); if (xclass == null) { // Class we're trying to resolve doesn't exist. // XXX: unfortunately, we don't know if the missing class is a // class or interface typeVertex = addClassVertexForMissingClass(classDescriptor, false); } else { // Add the class and all its superclasses/superinterfaces to the // inheritance graph. // This will result in a resolved ClassVertex. typeVertex = addClassAndGetClassVertex(xclass); } } return typeVertex; }
public void setAppClassList(List<ClassDescriptor> appClassCollection) { // FIXME: we really should drive the progress callback here HashSet<ClassDescriptor> appSet = new HashSet<>(appClassCollection); Collection<ClassDescriptor> allClassDescriptors = new ArrayList<>(DescriptorFactory.instance() .getAllClassDescriptors()); for (ClassDescriptor appClass : allClassDescriptors) { try { XClass xclass = currentXFactory().getXClass(appClass); if (xclass == null) { continue; } // Add the application class to the database if (appSet.contains(appClass)) { getSubtypes2().addApplicationClass(xclass); } else if (xclass instanceof ClassInfo) { getSubtypes2().addClass(xclass); } } catch (Exception e) { AnalysisContext.logError("Unable to get XClass for " + appClass, e); } } if (true && Subtypes2.DEBUG) { System.out.println(getSubtypes2().getGraph().getNumVertices() + " vertices in inheritance graph"); } }
XClass xClass = AnalysisContext.currentXFactory().getXClass(cd); if (xClass == null) { return Priorities.IGNORE_PRIORITY;
XClass superclassXClass = AnalysisContext.currentXFactory().getXClass(superclassDescriptor); if (superclassXClass == null) {
public boolean isSubtype(ClassDescriptor subDesc, ClassDescriptor... superDesc) throws ClassNotFoundException { for (ClassDescriptor s : superDesc) { if (subDesc.equals(s)) { return true; } } XClass xclass = AnalysisContext.currentXFactory().getXClass(subDesc); if (xclass != null) { ClassDescriptor xSuper = xclass.getSuperclassDescriptor(); for (ClassDescriptor s : superDesc) { if (s.equals(xSuper)) { return true; } } } SupertypeQueryResults supertypeQueryResults = getSupertypeQueryResults(subDesc); for (ClassDescriptor s : superDesc) { if (supertypeQueryResults.containsType(s)) { return true; } } return false; }
XClass xclass = AnalysisContext.currentXFactory().getXClass(subDesc); if (xclass != null) { ClassDescriptor xSuper = xclass.getSuperclassDescriptor();
XClass xClass = AnalysisContext.currentXFactory().getXClass(superDescriptor); if(xClass == null || (!xClass.isInterface() && !xClass.isAbstract())) { return false; continue; XClass xSubClass = AnalysisContext.currentXFactory().getXClass(subDescriptor); if (xSubClass == null || (!xSubClass.isAbstract() && !xSubClass.isInterface() && !subtypes2.isSubtype(subDescriptor,
if (!subclass.equals(getClassDescriptor())) { XClass xSub = AnalysisContext.currentXFactory().getXClass(subclass); if (xSub != null && xSub.findMethod("readResolve", "()Ljava/lang/Object;", false) == null && xSub.findMethod("writeReplace", "()Ljava/lang/Object;", false) == null) {
continue locationLoop; XClass xc = AnalysisContext.currentXFactory().getXClass(m.getClassDescriptor()); if (!(inv instanceof INVOKESTATIC) && !(m.isFinal() || xc.isFinal())) { priority = Priorities.NORMAL_PRIORITY;
XField xField = (XField)field; if((xField.isPublic() || xField.isProtected())) { XClass xClass = AnalysisContext.currentXFactory().getXClass(xField.getClassDescriptor()); if(xClass != null && xClass.isPublic()) { priority = NORMAL_PRIORITY;
@Override public AnnotatedObject getContainingScope() { // TODO Auto-generated method stub return AnalysisContext.currentXFactory().getXClass( DescriptorFactory.createClassDescriptorFromDottedClassName(getClassName())); }
private ClassVertex optionallyResolveClassVertex(ClassDescriptor classDescriptor) { ClassVertex typeVertex = classDescriptorToVertexMap.get(classDescriptor); if (typeVertex == null) { // We have never tried to resolve this ClassVertex before. // Try to find the XClass for this class. XClass xclass = AnalysisContext.currentXFactory().getXClass(classDescriptor); if (xclass == null) { // Class we're trying to resolve doesn't exist. // XXX: unfortunately, we don't know if the missing class is a // class or interface typeVertex = addClassVertexForMissingClass(classDescriptor, false); } else { // Add the class and all its superclasses/superinterfaces to the // inheritance graph. // This will result in a resolved ClassVertex. typeVertex = addClassAndGetClassVertex(xclass); } } return typeVertex; }
public void setAppClassList(List<ClassDescriptor> appClassCollection) { // FIXME: we really should drive the progress callback here HashSet<ClassDescriptor> appSet = new HashSet<ClassDescriptor>(appClassCollection); Collection<ClassDescriptor> allClassDescriptors = new ArrayList<ClassDescriptor>(DescriptorFactory.instance() .getAllClassDescriptors()); for (ClassDescriptor appClass : allClassDescriptors) { try { XClass xclass = currentXFactory().getXClass(appClass); if (xclass == null) { continue; } // Add the application class to the database if (appSet.contains(appClass)) { getSubtypes2().addApplicationClass(xclass); } else if (xclass instanceof ClassInfo) { getSubtypes2().addClass(xclass); } } catch (Exception e) { AnalysisContext.logError("Unable to get XClass for " + appClass, e); } } if (true && Subtypes2.DEBUG) { System.out.println(getSubtypes2().getGraph().getNumVertices() + " vertices in inheritance graph"); } }
XClass xClass = AnalysisContext.currentXFactory().getXClass(cd); if (xClass == null) { return Priorities.IGNORE_PRIORITY;
XClass superclassXClass = AnalysisContext.currentXFactory().getXClass(superclassDescriptor); if (superclassXClass == null) {
public boolean isSubtype(ClassDescriptor subDesc, ClassDescriptor... superDesc) throws ClassNotFoundException { for (ClassDescriptor s : superDesc) { if (subDesc.equals(s)) { return true; } } XClass xclass = AnalysisContext.currentXFactory().getXClass(subDesc); if (xclass != null) { ClassDescriptor xSuper = xclass.getSuperclassDescriptor(); for (ClassDescriptor s : superDesc) { if (s.equals(xSuper)) { return true; } } } SupertypeQueryResults supertypeQueryResults = getSupertypeQueryResults(subDesc); for (ClassDescriptor s : superDesc) { if (supertypeQueryResults.containsType(s)) { return true; } } return false; }
XClass xclass = AnalysisContext.currentXFactory().getXClass(subDesc); if (xclass != null) { ClassDescriptor xSuper = xclass.getSuperclassDescriptor();
XClass xClass = AnalysisContext.currentXFactory().getXClass(superDescriptor); if(xClass == null || (!xClass.isInterface() && !xClass.isAbstract())) { return false; continue; XClass xSubClass = AnalysisContext.currentXFactory().getXClass(subDescriptor); if (xSubClass == null || (!xSubClass.isAbstract() && !xSubClass.isInterface() && !subtypes2.isSubtype(subDescriptor,
continue locationLoop; XClass xc = AnalysisContext.currentXFactory().getXClass(m.getClassDescriptor()); if (!(inv instanceof INVOKESTATIC) && !(m.isFinal() || xc.isFinal())) { priority = Priorities.NORMAL_PRIORITY;