You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* *******************************************************************
  2. * Copyright (c) 1999-2001 Xerox Corporation,
  3. * 2002 Palo Alto Research Center, Incorporated (PARC).
  4. * All rights reserved.
  5. * This program and the accompanying materials are made available
  6. * under the terms of the Common Public License v1.0
  7. * which accompanies this distribution and is available at
  8. * http://www.eclipse.org/legal/cpl-v10.html
  9. *
  10. * Contributors:
  11. * Xerox/PARC initial implementation
  12. * ******************************************************************/
  13. package org.aspectj.testing.compare;
  14. import java.util.Vector;
  15. /** Generalize regular expression interface (to avoid binding to regexp provider)*/
  16. public interface Regexp {
  17. /** @return the substrings matched in argument by this regular expression */
  18. public Vector getGroups(String argument);
  19. /** @return true if argument is matched by this regular expression */
  20. public boolean matches(String argument);
  21. /**
  22. * Set pattern used in this regular expression.
  23. * May throw Exception if the pattern can be determined to be illegal
  24. * during initialization.
  25. * @throws Exception if pattern is illegal
  26. */
  27. public void setPattern(String pattern) throws Exception;
  28. /**
  29. * @return a string representaion of the pattern
  30. * (may not be legal or the input)
  31. */
  32. public String getPattern() ;
  33. }