/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + reader.locationDescription()); }
/** * Throws a ParseException for an unexpected keyword. */ private int unknownAccessFlag() throws ParseException { throw new ParseException("Unexpected keyword " + 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_ACC_METHOD) != 0) { throw new ParseException("Invalid field access modifier for method 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_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_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()); } }
/** * 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()); } }
/** * Constructs a readable description of the current position in this * WordReader and its included WordReader objects. * * @return the description. */ public String locationDescription() { return (includeWordReader == null ? (currentWord == null ? "end of " : "'" + currentWord + "' in " ) : (includeWordReader.locationDescription() + ",\n" + " included from ")) + lineLocationDescription(); }
/** * Constructs a readable description of the current position in this * WordReader and its included WordReader objects. * * @return the description. */ public String locationDescription() { return (includeWordReader == null ? (currentWord == null ? "end of " : "'" + currentWord + "' in " ) : (includeWordReader.locationDescription() + ",\n" + " included from ")) + lineLocationDescription(); }
/** * Checks whether the given word is a valid Java identifier and throws * a ParseException if it isn't. Wildcard characters are accepted. */ private void checkJavaIdentifier(String expectedDescription) throws ParseException { if (!isJavaIdentifier(nextWord)) { throw new ParseException("Expecting " + expectedDescription + " before " + reader.locationDescription()); } }
private int parseIntegerArgument() throws ParseException, IOException { try { // Read the obligatory integer. readNextWord("integer"); int integer = Integer.parseInt(nextWord); readNextWord(); return integer; } catch (NumberFormatException e) { throw new ParseException("Expecting integer argument instead of '" + nextWord + "' before " + reader.locationDescription()); } }
/** * Reads the next word of the configuration in the 'nextWord' field, * throwing an exception if there is no next word. */ private void readNextWord(String expectedDescription, boolean expectingAtCharacter) throws ParseException, IOException { readNextWord(); if (configurationEnd(expectingAtCharacter)) { throw new ParseException("Expecting " + expectedDescription + " before " + reader.locationDescription()); } }
private int parseClassVersion() throws ParseException, IOException { // Read the obligatory target. readNextWord("java version"); int classVersion = ClassUtil.internalClassVersion(nextWord); if (classVersion == 0) { throw new ParseException("Unsupported java version " + reader.locationDescription()); } readNextWord(); return classVersion; }
private int parseClassVersion() throws ParseException, IOException { // Read the obligatory target. readNextWord("java version"); int classVersion = ClassUtil.internalClassVersion(nextWord); if (classVersion == 0) { throw new ParseException("Unsupported java version " + reader.locationDescription()); } readNextWord(); return classVersion; }
private int parseClassVersion() throws ParseException, IOException { // Read the obligatory target. readNextWord("java version"); int classVersion = ClassUtil.internalClassVersion(nextWord); if (classVersion == 0) { throw new ParseException("Unsupported java version " + reader.locationDescription()); } readNextWord(); return classVersion; }
private int parseClassVersion() throws ParseException, IOException { // Read the obligatory target. readNextWord("java version"); int classVersion = ClassUtil.internalClassVersion(nextWord); if (classVersion == 0) { throw new ParseException("Unsupported java version " + reader.locationDescription()); } readNextWord(); return classVersion; }