Example #1
0
 protected boolean differentPackageAndPrivate(RefType ref_inspecting) {
   RefType ref_type = (RefType) m_thisRef.getType();
   SootClass this_class = getClassForType(ref_type);
   SootClass class_inspecting = getClassForType(ref_inspecting);
   if (this_class.getPackageName().equals(class_inspecting.getPackageName())) return false;
   if (class_inspecting.isPublic() == false) return true;
   return false;
 }
Example #2
0
  protected boolean typeIsPublic(Type type) {
    Type poss_ref_type;
    if (type instanceof ArrayType) {
      ArrayType array_type = (ArrayType) type;
      poss_ref_type = array_type.baseType;
    } else {
      poss_ref_type = type;
    }

    if (poss_ref_type instanceof RefType) {
      RefType ref_type = (RefType) poss_ref_type;
      SootClass soot_class = ref_type.getSootClass();
      return soot_class.isPublic();
    } else {
      return true;
    }
  }