@Override public boolean isAccessible(SootMethod method) { return method.isPublic() || method.isProtected(); }
/** * Returns true if the given method is visible to client code. */ private static boolean visible(SootMethod mPrime) { SootClass cPrime = mPrime.getDeclaringClass(); return (cPrime.isPublic() || cPrime.isProtected() || (!cPrime.isPrivate() && !ASSUME_PACKAGES_SEALED)) && (mPrime.isPublic() || mPrime.isProtected() || (!mPrime.isPrivate() && !ASSUME_PACKAGES_SEALED)); } }
/** Returns true if the method m is visible from code in the class from. */ private boolean isVisible(SootClass from, SootMethod m) { from.checkLevel(SootClass.HIERARCHY); if (m.isPublic()) { return true; } if (m.isPrivate()) { return from.equals(m.getDeclaringClass()); } if (m.isProtected()) { return canStoreClass(from, m.getDeclaringClass()); } // m is package return from.getJavaPackageName().equals(m.getDeclaringClass().getJavaPackageName()); // || canStoreClass( from, m.getDeclaringClass() ); }
if (!inlinee.isPrivate() && !inlinee.isProtected() && !inlinee.isPublic()) { if (!inlineeClass.getPackageName().equals(containerClass.getPackageName())) { return true; if (inlinee.isProtected()) { Hierarchy h = Scene.v().getActiveHierarchy(); boolean saved = false;
/** * Checks whether the given method shall be included in summary generation. If * so, it is added to the analysis task * * @param analysisTask The analysis task to which to add the method * @param sm The method to analyze * @return True if the method is to be analyzed, false otherwise */ private boolean checkAndAdd(ClassAnalysisTask analysisTask, SootMethod sm) { if (!sm.isConcrete()) return false; if (!sm.isPublic() && !sm.isProtected()) return false; // We normally don't analyze hashCode() and equals() final String sig = sm.getSignature(); if (!config.getSummarizeHashCodeEquals()) { if (sig.equals("int hashCode()") || sig.equals("boolean equals(java.lang.Object)")) return false; } analysisTask.addMethod(sig); return true; }
/** Returns true if the method m is visible from code in the class from. */ private boolean isVisible( SootClass from, SootMethod m ) { from.checkLevel(SootClass.HIERARCHY); if( m.isPublic() ) return true; if( m.isPrivate() ) { return from.equals( m.getDeclaringClass() ); } if( m.isProtected() ) { return canStoreClass( from, m.getDeclaringClass() ); } // m is package return from.getJavaPackageName().equals( m.getDeclaringClass().getJavaPackageName() ); //|| canStoreClass( from, m.getDeclaringClass() ); }
/** Returns true if the method m is visible from code in the class from. */ private boolean isVisible( SootClass from, SootMethod m ) { from.checkLevel(SootClass.HIERARCHY); if( m.isPublic() ) return true; if( m.isPrivate() ) { return from.equals( m.getDeclaringClass() ); } if( m.isProtected() ) { return canStoreClass( from, m.getDeclaringClass() ); } // m is package return from.getJavaPackageName().equals( m.getDeclaringClass().getJavaPackageName() ); //|| canStoreClass( from, m.getDeclaringClass() ); }
/** Returns true if the method m is visible from code in the class from. */ public boolean isVisible( SootClass from, SootMethod m ) { from.checkLevel(SootClass.HIERARCHY); m.getDeclaringClass().checkLevel(SootClass.HIERARCHY); if( m.isPublic() ) return true; if( m.isPrivate() ) { return from.equals( m.getDeclaringClass() ); } if( m.isProtected() ) { return isClassSubclassOfIncluding( from, m.getDeclaringClass() ); } // m is package return from.getJavaPackageName().equals( m.getDeclaringClass().getJavaPackageName() ); //|| isClassSubclassOfIncluding( from, m.getDeclaringClass() ); }
/** Returns true if the method m is visible from code in the class from. */ public boolean isVisible( SootClass from, SootMethod m ) { from.checkLevel(SootClass.HIERARCHY); m.getDeclaringClass().checkLevel(SootClass.HIERARCHY); if( m.isPublic() ) return true; if( m.isPrivate() ) { return from.equals( m.getDeclaringClass() ); } if( m.isProtected() ) { return isClassSubclassOfIncluding( from, m.getDeclaringClass() ); } // m is package return from.getJavaPackageName().equals( m.getDeclaringClass().getJavaPackageName() ); //|| isClassSubclassOfIncluding( from, m.getDeclaringClass() ); }
if (currentMethod.isPrivate() || currentMethod.isProtected() || !currentMethod.isConstructor()) continue; constructors.add(currentMethod);