Top Inners Fields Constructors Methods
org.aspectj.bridge.context

public Class PinpointingMessageHandler

extends Object
implements IMessageHandler
Class Inheritance
All Implemented Interfaces
org.aspectj.bridge.IMessageHandler
Imports
java.io.PrintWriter, .StringWriter, java.util.List, org.aspectj.bridge.AbortException, .IMessage, .IMessageHandler, .ISourceLocation, .IMessage.Kind

Author
colyer Facade for an IMessageHandler Extends message with details of exactly what the compiler / weaver was doing at the time. Use the -Xdev:Pinpoint option to turn this facility on.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private IMessageHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dontIgnore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.dontIgnore.

Allow fine grained configuration after initialization.
public boolean
handleMessage(IMessage
the IMessage to handle - never null
message
)

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message, by reporting and/or throwing an AbortException.
public void
ignore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.ignore.

Allow fine grained configuration after initialization.
public boolean
isIgnoring(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private IMessageHandler delegate

Constructor Detail

PinpointingMessageHandlerback to summary
public PinpointingMessageHandler(IMessageHandler delegate)

Method Detail

dontIgnoreback to summary
public void dontIgnore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.dontIgnore.

Doc from org.aspectj.bridge.IMessageHandler.dontIgnore.

Allow fine grained configuration after initialization. Minaly used in LTW. Most of the implementation can have this method be a no-op.

handleMessageback to summary
public boolean handleMessage(IMessage message) throws AbortException

Implements org.aspectj.bridge.IMessageHandler.handleMessage.

Doc from org.aspectj.bridge.IMessageHandler.handleMessage.

Handle message, by reporting and/or throwing an AbortException.

Parameters
message:IMessage

the IMessage to handle - never null

Returns:boolean

true if this message was handled by this handler

Exceptions
AbortException:
depending on handler logic.
ignoreback to summary
public void ignore(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.ignore.

Doc from org.aspectj.bridge.IMessageHandler.ignore.

Allow fine grained configuration after initialization.

isIgnoringback to summary
public boolean isIgnoring(IMessage.Kind kind)

Implements org.aspectj.bridge.IMessageHandler.isIgnoring.

Doc from org.aspectj.bridge.IMessageHandler.isIgnoring.

Signal clients whether this will ignore messages of a given type. Clients may use this to avoid constructing or sending certain messages.

Returns:boolean

true if this handler is ignoring all messages of this type

org.aspectj.bridge.context back to summary

private Class PinpointingMessageHandler.MessageIssued

extends RuntimeException
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

MessageIssuedback to summary
private MessageIssued()

Method Detail

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

org.aspectj.bridge.context back to summary

private Class PinpointingMessageHandler.PinpointedMessage

extends Object
implements IMessage
Class Inheritance
  • java.lang.Object
  • org.aspectj.bridge.context.PinpointingMessageHandler.PinpointedMessage
All Implemented Interfaces
org.aspectj.bridge.IMessage

Field Summary

Modifier and TypeField and Description
private IMessage
private String

Constructor Summary

AccessConstructor and Description
public
PinpointedMessage(IMessage delegate, String pinpoint)

Method Summary

Modifier and TypeMethod and Description
public boolean
getDeclared()

Implements org.aspectj.bridge.IMessage.getDeclared.

Caller can verify if this message came about because of a DEOW
public String
public List<ISourceLocation>
getExtraSourceLocations()

Implements org.aspectj.bridge.IMessage.getExtraSourceLocations.

Return a List of ISourceLocation instances that indicate additional source locations relevent to this message as specified by the message creator.
public int
getID()

Implements org.aspectj.bridge.IMessage.getID.

Return the ID of the message where applicable, see IProblem for list of valid IDs
public IMessage.Kind
public String
public int
getSourceEnd()

Implements org.aspectj.bridge.IMessage.getSourceEnd.

Return the end position of the problem (inclusive), or -1 if unknown.
public ISourceLocation
public int
getSourceStart()

Implements org.aspectj.bridge.IMessage.getSourceStart.

Return the start position of the problem (inclusive), or -1 if unknown.
public Throwable
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private IMessage delegate
messageback to summary
private String message

Constructor Detail

PinpointedMessageback to summary
public PinpointedMessage(IMessage delegate, String pinpoint)

Method Detail

getDeclaredback to summary
public boolean getDeclared()

Implements org.aspectj.bridge.IMessage.getDeclared.

Doc from org.aspectj.bridge.IMessage.getDeclared.

Caller can verify if this message came about because of a DEOW

getDetailsback to summary
public String getDetails()

Implements org.aspectj.bridge.IMessage.getDetails.

Returns:String

Doc from org.aspectj.bridge.IMessage.getDetails.

Detailed information about the message. For example, for declare error/warning messages this returns information about the corresponding join point's static part.

getExtraSourceLocationsback to summary
public List<ISourceLocation> getExtraSourceLocations()

Implements org.aspectj.bridge.IMessage.getExtraSourceLocations.

Doc from org.aspectj.bridge.IMessage.getExtraSourceLocations.

Return a List of ISourceLocation instances that indicate additional source locations relevent to this message as specified by the message creator. The list should not include the primary source location associated with the message which can be obtained from getSourceLocation().

An example of using extra locations would be in a warning message that flags all shadow locations that will go unmatched due to a pointcut definition being based on a subtype of a defining type.

Returns:List<ISourceLocation>

a list of additional source locations

getIDback to summary
public int getID()

Implements org.aspectj.bridge.IMessage.getID.

Doc from org.aspectj.bridge.IMessage.getID.

Return the ID of the message where applicable, see IProblem for list of valid IDs

getKindback to summary
public IMessage.Kind getKind()

Implements org.aspectj.bridge.IMessage.getKind.

Returns:IMessage.Kind

Doc from org.aspectj.bridge.IMessage.getKind.

the kind of this message

getMessageback to summary
public String getMessage()

Implements org.aspectj.bridge.IMessage.getMessage.

Returns:String

Doc from org.aspectj.bridge.IMessage.getMessage.

non-null String with simple message

getSourceEndback to summary
public int getSourceEnd()

Implements org.aspectj.bridge.IMessage.getSourceEnd.

Doc from org.aspectj.bridge.IMessage.getSourceEnd.

Return the end position of the problem (inclusive), or -1 if unknown.

getSourceLocationback to summary
public ISourceLocation getSourceLocation()

Implements org.aspectj.bridge.IMessage.getSourceLocation.

Returns:ISourceLocation

Doc from org.aspectj.bridge.IMessage.getSourceLocation.

source location associated with this message, or null if none

getSourceStartback to summary
public int getSourceStart()

Implements org.aspectj.bridge.IMessage.getSourceStart.

Doc from org.aspectj.bridge.IMessage.getSourceStart.

Return the start position of the problem (inclusive), or -1 if unknown.

getThrownback to summary
public Throwable getThrown()

Implements org.aspectj.bridge.IMessage.getThrown.

Returns:Throwable

Doc from org.aspectj.bridge.IMessage.getThrown.

Throwable associated with this message, or null if none

isAbortback to summary
public boolean isAbort()

Implements org.aspectj.bridge.IMessage.isAbort.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isAbort.

true if the process is aborting

isDebugback to summary
public boolean isDebug()

Implements org.aspectj.bridge.IMessage.isDebug.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isDebug.

true if this is an internal debug message

isErrorback to summary
public boolean isError()

Implements org.aspectj.bridge.IMessage.isError.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isError.

true if this is an error

isFailedback to summary
public boolean isFailed()

Implements org.aspectj.bridge.IMessage.isFailed.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isFailed.

true if something failed

isInfoback to summary
public boolean isInfo()

Implements org.aspectj.bridge.IMessage.isInfo.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isInfo.

true if this is information for the user

isTaskTagback to summary
public boolean isTaskTag()

Implements org.aspectj.bridge.IMessage.isTaskTag.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isTaskTag.

true if this is a task tag message

isUsageback to summary
public boolean isUsage()

Implements org.aspectj.bridge.IMessage.isUsage.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isUsage.

true if this is a compiler usage message

isWarningback to summary
public boolean isWarning()

Implements org.aspectj.bridge.IMessage.isWarning.

Returns:boolean

Doc from org.aspectj.bridge.IMessage.isWarning.

true if this is a warning