Package org.aspectj.bridge
Klasse Message
java.lang.Object
org.aspectj.bridge.Message
- Alle implementierten Schnittstellen:
IMessage
- Bekannte direkte Unterklassen:
LintMessage
,WeaveMessage
Implement messages. This implementation is immutable if ISourceLocation is immutable.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.aspectj.bridge.IMessage
IMessage.Kind
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorBeschreibungMessage
(String message, String details, IMessage.Kind kind, ISourceLocation sourceLocation, Throwable thrown, ISourceLocation[] extraSourceLocations) Create a message, handling null values for message and kind if thrown is not null.Message
(String message, String details, IMessage.Kind kind, ISourceLocation sLoc, Throwable thrown, ISourceLocation[] otherLocs, boolean declared, int id, int sourcestart, int sourceend) Message
(String message, IMessage.Kind kind, Throwable thrown, ISourceLocation sourceLocation) Create a message, handling null values for message and kind if thrown is not null.Message
(String message, ISourceLocation location, boolean isError) Create a (compiler) error or warning messageMessage
(String message, ISourceLocation location, boolean isError, ISourceLocation[] extraSourceLocations) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Caller can verify if this message came about because of a DEOWReturn a List ofISourceLocation
instances that indicate additional source locations relevent to this message as specified by the message creator.int
getID()
Return the ID of the message where applicable, see IProblem for list of valid IDsgetKind()
final String
int
Return the end position of the problem (inclusive), or -1 if unknown.final ISourceLocation
int
Return the start position of the problem (inclusive), or -1 if unknown.final Throwable
boolean
isAbort()
boolean
isDebug()
boolean
isError()
boolean
isFailed()
boolean
isInfo()
boolean
boolean
isUsage()
boolean
toString()
-
Konstruktordetails
-
Message
Create a (compiler) error or warning message- Parameter:
message
- the String used as the underlying messagelocation
- the ISourceLocation, if any, associated with this messageisError
- if true, use IMessage.ERROR; else use IMessage.WARNING
-
Message
public Message(String message, ISourceLocation location, boolean isError, ISourceLocation[] extraSourceLocations) -
Message
public Message(String message, String details, IMessage.Kind kind, ISourceLocation sourceLocation, Throwable thrown, ISourceLocation[] extraSourceLocations) Create a message, handling null values for message and kind if thrown is not null.- Parameter:
message
- the String used as the underlying messagedetails
- descriptive information about the messagekind
- the IMessage.Kind of message - not nullsourceLocation
- the ISourceLocation, if any, associated with this messagethrown
- the Throwable, if any, associated with this message- Löst aus:
IllegalArgumentException
- if message is null and thrown is null or has a null message, or if kind is null and thrown is null.
-
Message
public Message(String message, String details, IMessage.Kind kind, ISourceLocation sLoc, Throwable thrown, ISourceLocation[] otherLocs, boolean declared, int id, int sourcestart, int sourceend) -
Message
public Message(String message, IMessage.Kind kind, Throwable thrown, ISourceLocation sourceLocation) Create a message, handling null values for message and kind if thrown is not null.- Parameter:
message
- the String used as the underlying messagekind
- the IMessage.Kind of message - not nullthrown
- the Throwable, if any, associated with this messagesourceLocation
- the ISourceLocation, if any, associated with this message- Löst aus:
IllegalArgumentException
- if message is null and thrown is null or has a null message, or if kind is null and thrown is null.
-
-
Methodendetails
-
getKind
-
isError
public boolean isError() -
isWarning
public boolean isWarning() -
isDebug
public boolean isDebug() -
isUsage
public boolean isUsage() -
isTaskTag
public boolean isTaskTag() -
isInfo
public boolean isInfo() -
isAbort
public boolean isAbort() -
getDeclared
public boolean getDeclared()Caller can verify if this message came about because of a DEOW- Angegeben von:
getDeclared
in SchnittstelleIMessage
-
isFailed
public boolean isFailed() -
getMessage
- Angegeben von:
getMessage
in SchnittstelleIMessage
- Gibt zurück:
- non-null String with simple message
-
getThrown
-
getSourceLocation
- Angegeben von:
getSourceLocation
in SchnittstelleIMessage
- Gibt zurück:
- ISourceLocation associated with this message, or null if none
-
toString
-
getDetails
- Angegeben von:
getDetails
in SchnittstelleIMessage
- Gibt zurück:
- Detailed information about the message. For example, for declare error/warning messages this returns information about the corresponding join point's static part.
-
getExtraSourceLocations
Beschreibung aus Schnittstelle kopiert:IMessage
Return a List ofISourceLocation
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 fromgetSourceLocation()
.
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.
- Angegeben von:
getExtraSourceLocations
in SchnittstelleIMessage
- Gibt zurück:
- a list of additional source locations
- Siehe auch:
-
getID
public int getID()Beschreibung aus Schnittstelle kopiert:IMessage
Return the ID of the message where applicable, see IProblem for list of valid IDs -
getSourceStart
public int getSourceStart()Beschreibung aus Schnittstelle kopiert:IMessage
Return the start position of the problem (inclusive), or -1 if unknown.- Angegeben von:
getSourceStart
in SchnittstelleIMessage
-
getSourceEnd
public int getSourceEnd()Beschreibung aus Schnittstelle kopiert:IMessage
Return the end position of the problem (inclusive), or -1 if unknown.- Angegeben von:
getSourceEnd
in SchnittstelleIMessage
-