/** look if this host has a tag named <code>aName</code> */ @Override public boolean hasTag(String aName) { return (searchForTag(aName) != -1); }
if (host.hasTag("DeprecatedTag") && !skipList.contains("Ljava/lang/Deprecated;")) { ImmutableAnnotation ann = new ImmutableAnnotation(AnnotationVisibility.RUNTIME, "Ljava/lang/Deprecated;", Collections.<AnnotationElement>emptySet()); if (host.hasTag("SignatureTag") && !skipList.contains("Ldalvik/annotation/Signature;")) { SignatureTag tag = (SignatureTag) host.getTag("SignatureTag"); List<String> splitSignature = SootToDexUtils.splitSignature(tag.getSignature());
@Override public int getJavaSourceStartLineNumber() { super.getJavaSourceStartLineNumber(); // search statements for first line number if (line == -1 && hasActiveBody()) { PatchingChain<Unit> unit = getActiveBody().getUnits(); for (Unit u : unit) { int l = u.getJavaSourceStartLineNumber(); if (l > -1) { // store l-1, as method header is usually one line before // 1st statement line = l - 1; break; } } } return line; }
/** Adds all the tags from h to this host. */ public void addAllTagsOf( Host h ) { for( Iterator<Tag> tIt = h.getTags().iterator(); tIt.hasNext(); ) { final Tag t = tIt.next(); addTag( t ); } } }
@Override public int getJavaSourceStartColumnNumber() { if (col <= 0) { // get line from source SourceLnPosTag tag = (SourceLnPosTag) getTag("SourceLnPosTag"); if (tag != null) { col = tag.startPos(); } else { col = -1; } } return col; } }
public int getJavaSourceLine(AbstractHost ah) { return ah.getJavaSourceStartLineNumber(); }
/** Adds all the tags from h to this host. */ public void addAllTagsOf( Host h ) { for( Iterator<Tag> tIt = h.getTags().iterator(); tIt.hasNext(); ) { final Tag t = tIt.next(); addTag( t ); } } }
@Override public int getJavaSourceStartLineNumber() { if (line <= 0) { // get line from source SourceLnPosTag tag = (SourceLnPosTag) getTag("SourceLnPosTag"); if (tag != null) { line = tag.startLn(); } else { // get line from bytecode LineNumberTag tag2 = (LineNumberTag) getTag("LineNumberTag"); if (tag2 != null) { line = tag2.getLineNumber(); } else { line = -1; } } } return line; }
/** get the Tag object named <code>aName</code> */ @Override public Tag getTag(String aName) { int tagIndex; if ((tagIndex = searchForTag(aName)) != -1) { return mTagList.get(tagIndex); } return null; }
/** remove the tag named <code>aName</code> */ @Override public void removeTag(String aName) { int tagIndex; if ((tagIndex = searchForTag(aName)) != -1) { mTagList.remove(tagIndex); } }
/** look if this host has a tag named <code>aName</code> */ public boolean hasTag(String aName) { return (searchForTag(aName) != -1); }
/** look if this host has a tag named <code>aName</code> */ public boolean hasTag(String aName) { return (searchForTag(aName) != -1); }
/** get the Tag object named <code>aName</code> */ public Tag getTag(String aName) { int tagIndex; if((tagIndex = searchForTag(aName)) != -1) { return mTagList.get(tagIndex); } return null; }
/** remove the tag named <code>aName</code> */ public void removeTag(String aName) { int tagIndex; if((tagIndex = searchForTag(aName)) != -1) { mTagList.remove(tagIndex); } }
/** remove the tag named <code>aName</code> */ public void removeTag(String aName) { int tagIndex; if((tagIndex = searchForTag(aName)) != -1) { mTagList.remove(tagIndex); } }
/** get the Tag object named <code>aName</code> */ public Tag getTag(String aName) { int tagIndex; if((tagIndex = searchForTag(aName)) != -1) { return mTagList.get(tagIndex); } return null; }