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.

IBuildMessageHandler.java 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /********************************************************************
  2. * Copyright (c) 2007 Contributors. All rights reserved.
  3. * This program and the accompanying materials are made available
  4. * under the terms of the Eclipse Public License v 2.0
  5. * which accompanies this distribution and is available at
  6. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  7. *
  8. * Contributors: IBM Corporation - initial API and implementation
  9. * Helen Hawkins - initial version (bug 148190)
  10. *******************************************************************/
  11. package org.aspectj.ajde.core;
  12. import org.aspectj.bridge.AbortException;
  13. import org.aspectj.bridge.IMessage;
  14. /**
  15. * Interface that handles messages sent from the compiler.
  16. * Implementations define which messages are logged and whether
  17. * the handler aborts the process.
  18. */
  19. public interface IBuildMessageHandler {
  20. /**
  21. * Handle message by reporting and/or throwing an AbortException.
  22. *
  23. * @param message the IMessage to handle - never null
  24. * @return true if this message was handled by this handler
  25. * @throws IllegalArgumentException if message is null
  26. * @throws AbortException depending on handler logic.
  27. */
  28. boolean handleMessage(IMessage message) throws AbortException;
  29. /**
  30. * Signal whether this will ignore messages of a given type.
  31. * Clients may use this to avoid constructing or sending
  32. * certain messages.
  33. *
  34. * @return true if this handler is ignoring all messages of this type
  35. */
  36. boolean isIgnoring(IMessage.Kind kind);
  37. /**
  38. * Allow fine grained configuration after initialization.
  39. *
  40. * @param kind
  41. */
  42. void dontIgnore(IMessage.Kind kind);
  43. /**
  44. * Allow fine grained configuration after initialization.
  45. *
  46. * @param kind
  47. */
  48. void ignore(IMessage.Kind kind);
  49. }