@Override public boolean equals(Object arg0) { if (arg0 == null) { return false; } if (arg0.getClass().equals(getClass())) { RTASelectorKey other = (RTASelectorKey) arg0; return selector.equals(other.selector); } else { return false; } }
public static Selector make(Language l, String selectorStr) { if (selectorStr == null) { throw new IllegalArgumentException("null selectorStr"); } try { String methodName = selectorStr.substring(0, selectorStr.indexOf('(')); String desc = selectorStr.substring(selectorStr.indexOf('(')); return new Selector(Atom.findOrCreateUnicodeAtom(methodName), Descriptor.findOrCreateUTF8(l, desc)); } catch (StringIndexOutOfBoundsException e) { throw new IllegalArgumentException("invalid selectorStr: " + selectorStr, e); } }
@Override public Atom getName() { return method.getSelector().getName(); }
/** * Find or create the canonical MethodReference instance for the given tuple. * * @param tref the type reference * @param selector the selector for the method * @throws IllegalArgumentException if selector is null */ public static synchronized MethodReference findOrCreate(TypeReference tref, Selector selector) { if (selector == null) { throw new IllegalArgumentException("selector is null"); } return findOrCreate(tref, selector.getName(), selector.getDescriptor()); }
break; case 2: if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;)V"))) { logger.debug("Handling Intent(String action)"); actionKey = actualParameters[1]; } else if (calleeSel.equals(Selector.make("<init>(Landroid/content/Intent;)V"))) { logger.debug("Handling Intent(Intent other)"); if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;Landroid/net/Uri;)V"))) { logger.debug("Handling Intent(String action, Uri uri)"); } else if (calleeSel.equals(Selector.make("<init>(Landroid/content/Context;Ljava/lang/Class;)V"))) { logger.debug("Handling Intent(Context, Class)"); actionKey = actualParameters[2]; if (calleeSel.equals(Selector.make("<init>(Ljava/lang/String;Landroid/net/Uri;Landroid/content/Context;Ljava/lang/Class;)V"))) { logger.debug("Handling Intent(String action, Uri uri, Context, Class)"); actionKey = actualParameters[4]; } else if (callee.getSelector().equals(Selector.make("setAction(Ljava/lang/String;)Landroid/content/Intent;")) && callee.getDeclaringClass().getName().equals(AndroidTypes.IntentName)) { final InstanceKey self = actualParameters[0]; } else if (callee.getSelector().equals(Selector.make("setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;"))) { } else if (callee.getSelector().equals(Selector.make("setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;")) || callee.getSelector().equals(Selector.make("setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;")) || callee.getSelector().equals(Selector.make("setClassName(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;"))) { final InstanceKey self = actualParameters[0];
public static Selector make(String selectorStr) { return make(Language.JAVA, selectorStr); }
@Override public String toString() { return "RTAKey:" + selector.toString(); }
/** * @return the descriptor component of this member reference */ public final Descriptor getDescriptor() { return selector.getDescriptor(); }
@Override public int hashCode() { return 131 * selector.hashCode(); }
}*/ else if (target.getSelector().equals(Selector.make("getSystemService(Ljava/lang/String;)Ljava/lang/Object;"))) { logger.debug("Encountered Context.getSystemService()"); return IntSetUtil.make(new int[] { 0, 1 }); } else if (target.getSelector().equals(Selector.make("setAction(Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 1 }); } else if (target.getSelector().equals(Selector.make("setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0 }); } else if (target.getSelector().equals(Selector.make("setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 }); } else if (target.getSelector().equals(Selector.make("setClassName(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 }); } else if (target.getSelector().equals(Selector.make("setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 });
public static Selector make(String selectorStr) { return make(Language.JAVA, selectorStr); }
@Override public String toString() { return "RTAKey:" + selector.toString(); }
/** * Find or create the canonical MethodReference instance for the given tuple. * * @param tref the type reference * @param selector the selector for the method * @throws IllegalArgumentException if selector is null */ public static synchronized MethodReference findOrCreate(TypeReference tref, Selector selector) { if (selector == null) { throw new IllegalArgumentException("selector is null"); } return findOrCreate(tref, selector.getName(), selector.getDescriptor()); }
/** * @return the descriptor component of this member reference */ public final Descriptor getDescriptor() { return selector.getDescriptor(); }
@Override public int hashCode() { return 131 * selector.hashCode(); }
@Override public boolean equals(Object arg0) { if (arg0 == null) { return false; } if (arg0.getClass().equals(getClass())) { RTASelectorKey other = (RTASelectorKey) arg0; return selector.equals(other.selector); } else { return false; } }
public static Selector make(Language l, String selectorStr) { if (selectorStr == null) { throw new IllegalArgumentException("null selectorStr"); } try { String methodName = selectorStr.substring(0, selectorStr.indexOf('(')); String desc = selectorStr.substring(selectorStr.indexOf('(')); return new Selector(Atom.findOrCreateUnicodeAtom(methodName), Descriptor.findOrCreateUTF8(l, desc)); } catch (StringIndexOutOfBoundsException e) { throw new IllegalArgumentException("invalid selectorStr: " + selectorStr, e); } }
}*/ else if (target.getSelector().equals(Selector.make("getSystemService(Ljava/lang/String;)Ljava/lang/Object;"))) { logger.debug("Encountered Context.getSystemService()"); return IntSetUtil.make(new int[] { 0, 1 }); } else if (target.getSelector().equals(Selector.make("setAction(Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 1 }); } else if (target.getSelector().equals(Selector.make("setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0 }); } else if (target.getSelector().equals(Selector.make("setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 }); } else if (target.getSelector().equals(Selector.make("setClassName(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 }); } else if (target.getSelector().equals(Selector.make("setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;"))) { return IntSetUtil.make(new int[] { 0, 2 });