Package org.aspectj.bridge
Klasse CountingMessageHandler
java.lang.Object
org.aspectj.bridge.CountingMessageHandler
- Alle implementierten Schnittstellen:
IMessageHandler
Wrap an IMessageHandler to count messages handled. Messages being ignored by the delegate IMessageHandler are not counted.
-
Feldübersicht
FelderVon Schnittstelle geerbte Felder org.aspectj.bridge.IMessageHandler
SYSTEM_ERR, SYSTEM_OUT, THROW -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddontIgnore(IMessage.Kind kind) DelegatebooleanhandleMessage(IMessage message) Handle message, by reporting and/or throwing an AbortException.booleanvoidignore(IMessage.Kind kind) DelegatebooleanisIgnoring(IMessage.Kind kind) Signal clients whether this will ignore messages of a given type.static CountingMessageHandlerintnumMessages(IMessage.Kind kind, boolean orGreater) Return count of messages seen through this interface.voidreset()toString()
-
Felddetails
-
delegate
-
proxy
-
-
Konstruktordetails
-
CountingMessageHandler
-
-
Methodendetails
-
makeCountingMessageHandler
-
handleMessage
Beschreibung aus Schnittstelle kopiert:IMessageHandlerHandle message, by reporting and/or throwing an AbortException.- Angegeben von:
handleMessagein SchnittstelleIMessageHandler- Parameter:
message- the IMessage to handle - never null- Gibt zurück:
- delegate.handleMessage(IMessage)
- Löst aus:
AbortException- depending on handler logic.
-
isIgnoring
Beschreibung aus Schnittstelle kopiert:IMessageHandlerSignal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.- Angegeben von:
isIgnoringin SchnittstelleIMessageHandler- Gibt zurück:
- delegate.isIgnoring(IMessage.Kind)
-
dontIgnore
Delegate- Angegeben von:
dontIgnorein SchnittstelleIMessageHandler- Parameter:
kind-- Siehe auch:
-
ignore
Delegate- Angegeben von:
ignorein SchnittstelleIMessageHandler- Parameter:
kind-- Siehe auch:
-
toString
-
numMessages
Return count of messages seen through this interface.- Parameter:
kind- the IMessage.Kind of the messages to count (if null, count all)orGreater- if true, then count this kind and any considered greater by the ordering of IMessage.Kind#COMPARATOR- Gibt zurück:
- number of messages of this kind (optionally or greater)
- Siehe auch:
-
hasErrors
public boolean hasErrors()- Gibt zurück:
- true if 0 is less than
numMessages(IMessage.ERROR, true)
-
reset
public void reset()
-