/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
public void setConfiguration(File configurationFile) throws BuildException { try { ConfigurationParser parser = new ConfigurationParser(configurationFile); try { parser.parse(configuration); } catch (ParseException ex) { throw new BuildException(ex.getMessage()); } finally { parser.close(); } } catch (IOException ex) { throw new BuildException(ex.getMessage()); } }
/** * A main method for testing configuration parsing. */ public static void main(String[] args) { try { ConfigurationParser parser = new ConfigurationParser(args, System.getProperties()); try { parser.parse(new Configuration()); } catch (ParseException ex) { ex.printStackTrace(); } finally { parser.close(); } } catch (IOException ex) { ex.printStackTrace(); } } }
/** * A main method for testing configuration parsing. */ public static void main(String[] args) { try { ConfigurationParser parser = new ConfigurationParser(args, System.getProperties()); try { parser.parse(new Configuration()); } catch (ParseException ex) { ex.printStackTrace(); } finally { parser.close(); } } catch (IOException ex) { ex.printStackTrace(); } } }
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
/** * A main method for testing configuration parsing. */ public static void main(String[] args) { try { ConfigurationParser parser = new ConfigurationParser(args, System.getProperties()); try { parser.parse(new Configuration()); } catch (ParseException ex) { ex.printStackTrace(); } finally { parser.close(); } } catch (IOException ex) { ex.printStackTrace(); } } }
throw new BuildException(e.getMessage(), e);
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
/** * A main method for testing configuration parsing. */ public static void main(String[] args) { try { ConfigurationParser parser = new ConfigurationParser(args); try { parser.parse(new Configuration()); } catch (ParseException ex) { ex.printStackTrace(); } finally { parser.close(); } } catch (IOException ex) { ex.printStackTrace(); } } }
throw new BuildException(ex.getMessage());
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
public void addText(String text) throws BuildException { try { String arg = getProject().replaceProperties(text); ConfigurationParser parser = new ConfigurationParser(new String[] { arg }, getProject().getBaseDir()); try { parser.parse(configuration); } catch (ParseException ex) { throw new BuildException(ex.getMessage()); } finally { parser.close(); } } catch (IOException ex) { throw new BuildException(ex.getMessage()); } }
/** * Checks whether the given access flags are valid method access flags, * throwing a ParseException if they aren't. */ private void checkMethodAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_ACC_METHOD) != 0) { throw new ParseException("Invalid field access modifier for method before " + reader.locationDescription()); } }
throw new IOException(ex.getMessage());
/** * Checks whether the given access flags are valid method access flags, * throwing a ParseException if they aren't. */ private void checkMethodAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_ACC_METHOD) != 0) { throw new ParseException("Invalid field access modifier for method before " + reader.locationDescription()); } }
throw new BuildException(ex.getMessage());
/** * Checks whether the given access flags are valid field access flags, * throwing a ParseException if they aren't. */ private void checkFieldAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_INTERNAL_ACC_FIELD) != 0) { throw new ParseException("Invalid method access modifier for field before " + reader.locationDescription()); } }
/** * Checks whether the given access flags are valid method access flags, * throwing a ParseException if they aren't. */ private void checkMethodAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_INTERNAL_ACC_METHOD) != 0) { throw new ParseException("Invalid field access modifier for method before " + reader.locationDescription()); } }
/** * Checks whether the given access flags are valid field access flags, * throwing a ParseException if they aren't. */ private void checkFieldAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_ACC_FIELD) != 0) { throw new ParseException("Invalid method access modifier for field before " + reader.locationDescription()); } }
/** * Checks whether the given access flags are valid field access flags, * throwing a ParseException if they aren't. */ private void checkFieldAccessFlags(int requiredSetMemberAccessFlags, int requiredUnsetMemberAccessFlags) throws ParseException { if (((requiredSetMemberAccessFlags | requiredUnsetMemberAccessFlags) & ~ClassConstants.VALID_ACC_FIELD) != 0) { throw new ParseException("Invalid method access modifier for field before " + reader.locationDescription()); } }