< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/ConfigReader.java

Print this page




 164 
 165     /**
 166      * This will  check if the qualified name matches the pattern
 167      *
 168      * @param qualifiedName
 169      *      The qualified name of the TypeDeclaration
 170      * @param pattern
 171      *       The  pattern obtained from the users input
 172      *
 173      */
 174     private boolean checkPatternMatch(String qualifiedName, Pattern pattern) {
 175         Matcher matcher = pattern.matcher(qualifiedName);
 176         return matcher.matches();
 177     }
 178 
 179 
 180 
 181     /**
 182      * Lazily parsed schema for the binding file.
 183      */
 184     private static SchemaCache configSchema = new SchemaCache("config.xsd", Config.class);
 185 
 186 
 187     /**
 188      * Parses an xml config file and returns a Config object.
 189      *
 190      * @param xmlFile
 191      *        The xml config file which is passed by the user to annotation processing
 192      * @return
 193      *        A non null Config object
 194      */
 195     private Config parseAndGetConfig (File xmlFile, ErrorHandler errorHandler, boolean disableSecureProcessing) throws SAXException, IOException {
 196         XMLReader reader;
 197         try {
 198             SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing);
 199             reader = factory.newSAXParser().getXMLReader();
 200         } catch (ParserConfigurationException e) {
 201             // in practice this will never happen
 202             throw new Error(e);
 203         }
 204         NGCCRuntimeEx runtime = new NGCCRuntimeEx(errorHandler);




 164 
 165     /**
 166      * This will  check if the qualified name matches the pattern
 167      *
 168      * @param qualifiedName
 169      *      The qualified name of the TypeDeclaration
 170      * @param pattern
 171      *       The  pattern obtained from the users input
 172      *
 173      */
 174     private boolean checkPatternMatch(String qualifiedName, Pattern pattern) {
 175         Matcher matcher = pattern.matcher(qualifiedName);
 176         return matcher.matches();
 177     }
 178 
 179 
 180 
 181     /**
 182      * Lazily parsed schema for the binding file.
 183      */
 184     private static SchemaCache configSchema = new SchemaCache("config.xsd", Config.class, true);
 185 
 186 
 187     /**
 188      * Parses an xml config file and returns a Config object.
 189      *
 190      * @param xmlFile
 191      *        The xml config file which is passed by the user to annotation processing
 192      * @return
 193      *        A non null Config object
 194      */
 195     private Config parseAndGetConfig (File xmlFile, ErrorHandler errorHandler, boolean disableSecureProcessing) throws SAXException, IOException {
 196         XMLReader reader;
 197         try {
 198             SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing);
 199             reader = factory.newSAXParser().getXMLReader();
 200         } catch (ParserConfigurationException e) {
 201             // in practice this will never happen
 202             throw new Error(e);
 203         }
 204         NGCCRuntimeEx runtime = new NGCCRuntimeEx(errorHandler);


< prev index next >