Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.core.dom
Class Message


java.lang.Object
  extended by 
org.eclipse.jdt.core.dom.Message

public class Message
extends Object

Error message used to report potential errors found during the AST parsing or name resolution. Instances of this class are immutable.

Since:
2.0

Constructor Summary
Message ( String message, int startPosition)
          Creates a message.
Message ( String message, int startPosition, int length)
          Creates a message.
 
Method Summary
 int getLength ()
          Returns the length in characters of the original source file indicating where the source fragment corresponding to this message ends.
  String getMessage ()
          Returns the localized message.
 int getSourcePosition ()
          Deprecated. Use getStartPosition() instead.
 int getStartPosition ()
          Returns the character index into the original source file.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(
String message,
               int startPosition)
Creates a message.

Parameters:
message - the localized message reported by the compiler
startPosition - the 0-based character index into the original source file, or -1 if no source position information is to be recorded for this message
Throws:
IllegalArgumentException - if the message is null
IllegalArgumentException - if the startPosition is lower than -1.

Message

public Message(
String message,
               int startPosition,
               int length)
Creates a message.

Parameters:
message - the localized message reported by the compiler
startPosition - the 0-based character index into the original source file, or -1 if no source position information is to be recorded for this message
length - the length in character of the original source file indicating where the source fragment corresponding to this message ends. 0 or a negative number if none. A negative number will be converted to a 0-length.
Throws:
IllegalArgumentException - if the message is null
IllegalArgumentException - if the startPosition is lower than -1.
Method Detail

getMessage

public 
String getMessage()
Returns the localized message.

Returns:
the localized message

getSourcePosition

public int getSourcePosition()
Deprecated. Use getStartPosition() instead.

Returns the character index into the original source file.

Returns:
the 0-based character index, or -1 if no source position information is recorded for this message
See Also:
getLength()

getStartPosition

public int getStartPosition()
Returns the character index into the original source file.

Returns:
the 0-based character index, or -1 if no source position information is recorded for this message
See Also:
getLength()

getLength

public int getLength()
Returns the length in characters of the original source file indicating where the source fragment corresponding to this message ends.

Returns:
a length, or 0 if no source length information is recorded for this message
See Also:
getStartPosition()

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire