com.android.builder.compiling
Class ResValueGenerator

java.lang.Object
  extended by com.android.builder.compiling.ResValueGenerator

public class ResValueGenerator
extends java.lang.Object

Class able to generate a res value file in an Android project.


Field Summary
static java.lang.String RES_VALUE_FILENAME_XML
           
 
Constructor Summary
ResValueGenerator(java.io.File genFolder)
          Creates a generator
 
Method Summary
 ResValueGenerator addItems(java.util.Collection<java.lang.Object> items)
           
 ResValueGenerator addResource(java.lang.String type, java.lang.String name, java.lang.String value)
           
 void generate()
          Generates the resource files
 java.io.File getFolderPath()
          Returns a File representing where the BuildConfig class will be.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RES_VALUE_FILENAME_XML

public static final java.lang.String RES_VALUE_FILENAME_XML
See Also:
Constant Field Values
Constructor Detail

ResValueGenerator

public ResValueGenerator(@NonNull
                         java.io.File genFolder)
Creates a generator

Parameters:
genFolder - the gen folder of the project
Method Detail

addResource

public ResValueGenerator addResource(@NonNull
                                     java.lang.String type,
                                     @NonNull
                                     java.lang.String name,
                                     @NonNull
                                     java.lang.String value)

addItems

public ResValueGenerator addItems(@Nullable
                                  java.util.Collection<java.lang.Object> items)

getFolderPath

public java.io.File getFolderPath()
Returns a File representing where the BuildConfig class will be.


generate

public void generate()
              throws java.io.IOException,
                     javax.xml.parsers.ParserConfigurationException
Generates the resource files

Throws:
java.io.IOException
javax.xml.parsers.ParserConfigurationException