Class 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.
    • Method Detail

      • exportLayoutNameFromInfoFileName

        public static java.lang.String exportLayoutNameFromInfoFileName​(java.lang.String infoFileName)
      • getResourceBundle

        public ResourceBundle getResourceBundle()
        used by the studio plugin
      • processRemovedFile

        public void processRemovedFile​(java.io.File input)
      • processFileWithNoDataBinding

        public void processFileWithNoDataBinding​(@NonNull
                                                 java.io.File file)
        Processes a layout file which does not contain data binding constructs.
      • processSingleFile

        public boolean processSingleFile​(@NonNull
                                         android.databinding.tool.util.RelativizableFile input,
                                         @NonNull
                                         java.io.File output,
                                         boolean isViewBindingEnabled,
                                         boolean isDataBindingEnabled)
                                  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
      • processResources

        public boolean processResources​(LayoutXmlProcessor.ResourceInput input,
                                        boolean isViewBindingEnabled,
                                        boolean isDataBindingEnabled)
                                 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
      • writeLayoutInfoFiles

        public void writeLayoutInfoFiles​(java.io.File xmlOutDir,
                                         JavaFileWriter writer)
                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • generateExportFileName

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

        public java.lang.String getPackage()