/** * Creates a new AllowEventsHeader based on the newly supplied event type * value. * * @param eventType - the new string containing the eventType value. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the eventType value. * @return the newly created AllowEventsHeader object. * @since v1.1 */ public AllowEventsHeader createAllowEventsHeader(String eventType) throws ParseException { if (eventType == null) throw new NullPointerException("null arg eventType"); AllowEvents allowEvents = new AllowEvents(); allowEvents.setEventType(eventType); return allowEvents; }
/** * Sets the methods supported defined by this AllowEventsHeader. * * * * @param methods - the Iterator of Strings defining the methods supported * * in this AllowEventsHeader * * @throws ParseException which signals that an error has been reached * * unexpectedly while parsing the Strings defining the methods supported. * * */ public void setMethods(List<String> methods) throws ParseException { ListIterator<String> it = methods.listIterator(); while (it.hasNext()) { AllowEvents allowEvents = new AllowEvents(); allowEvents.setEventType((String) it.next()); this.add(allowEvents); } } }
this.lexer.match(TokenTypes.ID); Token token = lexer.getNextToken(); allowEvents.setEventType(token.getTokenValue()); this.lexer.match(TokenTypes.ID); token = lexer.getNextToken(); allowEvents.setEventType(token.getTokenValue());
this.lexer.match(TokenTypes.ID); Token token = lexer.getNextToken(); allowEvents.setEventType(token.getTokenValue()); this.lexer.match(TokenTypes.ID); token = lexer.getNextToken(); allowEvents.setEventType(token.getTokenValue());