All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.aspectj.bridge.IMessageHolder Maven / Gradle / Ivy

Go to download

AspectJ tools most notably contains the AspectJ compiler (AJC). AJC applies aspects to Java classes during compilation, fully replacing Javac for plain Java classes and also compiling native AspectJ or annotation-based @AspectJ syntax. Furthermore, AJC can weave aspects into existing class files in a post-compile binary weaving step. This library is a superset of AspectJ weaver and hence also of AspectJ runtime.

There is a newer version: 1.9.22.1
Show newest version
/* *******************************************************************
 * Copyright (c) 1999-2001 Xerox Corporation,
 *               2002 Palo Alto Research Center, Incorporated (PARC).
 * All rights reserved.
 * This program and the accompanying materials are made available
 * under the terms of the Eclipse Public License v 2.0
 * which accompanies this distribution and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
 *
 * Contributors:
 *     Xerox/PARC     initial implementation
 * ******************************************************************/

package org.aspectj.bridge;

import java.util.List;

/**
 * Hold and query a collection of messages.
 */
public interface IMessageHolder extends IMessageHandler { // XXX do not extend - mix instead
	// XXX go to LT EQ GT GE LE rather than simple orGreater
	/** value for orGreater parameter */
	boolean ORGREATER = true;

	/** value for orGreater parameter */
	boolean EQUAL = false;

	/**
	 * Tell whether this holder has any message of this kind (optionally or greater).
	 *
	 * @param kind the IMessage.Kind to check for - accept any if null
	 * @param orGreater if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR
	 * @return true if this holder has any message of this kind, or if orGreater and any message has a greater kind, as determined
	 *         by IMessage.Kind.COMPARATOR
	 */
	boolean hasAnyMessage(IMessage.Kind kind, boolean orGreater);

	/**
	 * Count the messages currently held by this holder. Pass null to get all kinds.
	 *
	 * @param kind the IMessage.Kind expected, or null for all messages
	 * @param orGreater if true, also any greater than the target kind as determined by IMessage.Kind.COMPARATOR
	 * @return number of IMessage held (now) by this holder
	 */
	int numMessages(IMessage.Kind kind, boolean orGreater);

	/**
	 * Get all messages or those of a specific kind. Pass null to get all kinds.
	 *
	 * @param kind the IMessage.Kind expected, or null for all messages
	 * @param orGreater if true, also get any greater than the target kind as determined by IMessage.Kind.COMPARATOR
	 * @return IMessage[] of messages of the right kind, or IMessage.NONE
	 */
	IMessage[] getMessages(IMessage.Kind kind, boolean orGreater);

	/** @return unmodifiable List view of underlying collection of IMessage */
	List getUnmodifiableListView();

	/**
	 * Clear any messages.
	 *
	 * @throws UnsupportedOperationException if message list is read-only
	 */
	void clearMessages() throws UnsupportedOperationException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy