android.databinding.tool
Class LayoutXmlProcessor

java.lang.Object
  extended by android.databinding.tool.LayoutXmlProcessor

public class LayoutXmlProcessor
extends java.lang.Object

Processes the layout XML, stripping the binding attributes and elements and writes the information into an annotated class file for the annotation processor to work with.


Nested Class Summary
static interface LayoutXmlProcessor.OriginalFileLookup
          Helper interface that can find the original copy of a resource XML.
static class LayoutXmlProcessor.ResourceInput
          API agnostic class to get resource changes incrementally.
 
Field Summary
static java.lang.String CLASS_NAME
           
static java.lang.String RESOURCE_BUNDLE_PACKAGE
           
 
Constructor Summary
LayoutXmlProcessor(java.lang.String applicationPackage, JavaFileWriter fileWriter, int minSdk, boolean isLibrary, LayoutXmlProcessor.OriginalFileLookup originalFileLookup)
           
 
Method Summary
static java.lang.String exportLayoutNameFromInfoFileName(java.lang.String infoFileName)
           
static java.lang.String generateExportFileName(java.lang.String fileName, java.lang.String dirName)
           
 java.lang.String getInfoClassFullName()
           
 java.lang.String getPackage()
           
 ResourceBundle getResourceBundle()
          used by the studio plugin
 boolean processResources(LayoutXmlProcessor.ResourceInput input)
           
static java.lang.String toSystemDependentPath(java.lang.String path)
           
 void writeInfoClass(java.io.File sdkDir, java.io.File xmlOutDir, java.io.File exportClassListTo)
           
 void writeInfoClass(java.io.File sdkDir, java.io.File xmlOutDir, java.io.File exportClassListTo, boolean enableDebugLogs, boolean printEncodedErrorLogs)
           
 void writeLayoutInfoFiles(java.io.File xmlOutDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_BUNDLE_PACKAGE

public static final java.lang.String RESOURCE_BUNDLE_PACKAGE
See Also:
Constant Field Values

CLASS_NAME

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

LayoutXmlProcessor

public LayoutXmlProcessor(java.lang.String applicationPackage,
                          JavaFileWriter fileWriter,
                          int minSdk,
                          boolean isLibrary,
                          LayoutXmlProcessor.OriginalFileLookup originalFileLookup)
Method Detail

getResourceBundle

public ResourceBundle getResourceBundle()
used by the studio plugin


processResources

public boolean processResources(LayoutXmlProcessor.ResourceInput input)
                         throws javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                javax.xml.xpath.XPathExpressionException,
                                java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
javax.xml.xpath.XPathExpressionException
java.io.IOException

toSystemDependentPath

public static java.lang.String toSystemDependentPath(java.lang.String path)

writeLayoutInfoFiles

public void writeLayoutInfoFiles(java.io.File xmlOutDir)
                          throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

getInfoClassFullName

public java.lang.String getInfoClassFullName()

generateExportFileName

public static java.lang.String generateExportFileName(java.lang.String fileName,
                                                      java.lang.String dirName)

exportLayoutNameFromInfoFileName

public static java.lang.String exportLayoutNameFromInfoFileName(java.lang.String infoFileName)

writeInfoClass

public void writeInfoClass(java.io.File sdkDir,
                           java.io.File xmlOutDir,
                           java.io.File exportClassListTo)

getPackage

public java.lang.String getPackage()

writeInfoClass

public void writeInfoClass(java.io.File sdkDir,
                           java.io.File xmlOutDir,
                           java.io.File exportClassListTo,
                           boolean enableDebugLogs,
                           boolean printEncodedErrorLogs)