com.android.ide.common.blame.parser.aapt
Class AbstractAaptOutputParser

java.lang.Object
  extended by com.android.ide.common.blame.parser.aapt.AbstractAaptOutputParser
All Implemented Interfaces:
PatternAwareOutputParser

public abstract class AbstractAaptOutputParser
extends java.lang.Object
implements PatternAwareOutputParser


Field Summary
static java.io.File ourRootDir
           
 
Constructor Summary
AbstractAaptOutputParser()
           
 
Method Summary
static int findResourceLine(java.io.File file, java.lang.String key, com.android.utils.ILogger logger)
          Locates a resource value definition in a given file for a given key, and returns the corresponding line number, or -1 if not found.
protected static com.android.ide.common.blame.parser.aapt.AbstractAaptOutputParser.FilePosition findSourcePosition(java.io.File file, int locationLine, java.lang.String message, com.android.utils.ILogger logger)
           
static int findValueDeclaration(java.io.File file, java.lang.String type, java.lang.String name, com.android.utils.ILogger logger)
          Locates a resource value declaration in a given file and returns the corresponding line number, or -1 if not found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.android.ide.common.blame.parser.PatternAwareOutputParser
parse
 

Field Detail

ourRootDir

public static java.io.File ourRootDir
Constructor Detail

AbstractAaptOutputParser

public AbstractAaptOutputParser()
Method Detail

findResourceLine

public static int findResourceLine(@NonNull
                                   java.io.File file,
                                   @NonNull
                                   java.lang.String key,
                                   @NonNull
                                   com.android.utils.ILogger logger)
Locates a resource value definition in a given file for a given key, and returns the corresponding line number, or -1 if not found. For example, given the key "string/group2_string" it will locate an element <string name="group2_string"> or <item type="string" name="group2_string"


findValueDeclaration

public static int findValueDeclaration(@NonNull
                                       java.io.File file,
                                       @NonNull
                                       java.lang.String type,
                                       @NonNull
                                       java.lang.String name,
                                       @NonNull
                                       com.android.utils.ILogger logger)
Locates a resource value declaration in a given file and returns the corresponding line number, or -1 if not found.


findSourcePosition

@Nullable
protected static com.android.ide.common.blame.parser.aapt.AbstractAaptOutputParser.FilePosition findSourcePosition(@NonNull
                                                                                                                            java.io.File file,
                                                                                                                            int locationLine,
                                                                                                                            java.lang.String message,
                                                                                                                            com.android.utils.ILogger logger)