org.eclipse.jdt.internal.core
Class JavaModelStatus

java.lang.Object
  extended by org.eclipse.core.runtime.Status
      extended by org.eclipse.jdt.internal.core.JavaModelStatus
All Implemented Interfaces:
IResourceStatus, org.eclipse.core.runtime.IStatus, IJavaModelStatus, IJavaModelStatusConstants

public class JavaModelStatus
extends org.eclipse.core.runtime.Status
implements IJavaModelStatus, IJavaModelStatusConstants, IResourceStatus

See Also:
IJavaModelStatus

Field Summary
static IJavaModelStatus VERIFIED_OK
          Singleton OK object
 
Fields inherited from class org.eclipse.core.runtime.Status
CANCEL_STATUS, OK_STATUS
 
Fields inherited from interface org.eclipse.jdt.core.IJavaModelStatusConstants
BAD_TEXT_EDIT_LOCATION, BUILDER_INITIALIZATION_ERROR, BUILDER_SERIALIZATION_ERROR, CANNOT_RETRIEVE_ATTACHED_JAVADOC, CLASSPATH_CYCLE, COMPILER_FAILURE, CORE_EXCEPTION, CP_CONTAINER_PATH_UNBOUND, CP_VARIABLE_PATH_UNBOUND, DEPRECATED_VARIABLE, DEVICE_PATH, DISABLED_CP_EXCLUSION_PATTERNS, DISABLED_CP_MULTIPLE_OUTPUT_LOCATIONS, DOM_EXCEPTION, ELEMENT_DOES_NOT_EXIST, ELEMENT_NOT_ON_CLASSPATH, EVALUATION_ERROR, INCOMPATIBLE_JDK_LEVEL, INDEX_OUT_OF_BOUNDS, INVALID_CLASSPATH, INVALID_CLASSPATH_FILE_FORMAT, INVALID_CONTENTS, INVALID_CP_CONTAINER_ENTRY, INVALID_DESTINATION, INVALID_ELEMENT_TYPES, INVALID_NAME, INVALID_PACKAGE, INVALID_PATH, INVALID_PROJECT, INVALID_RESOURCE, INVALID_RESOURCE_TYPE, INVALID_SIBLING, IO_EXCEPTION, NAME_COLLISION, NO_ELEMENTS_TO_PROCESS, NO_LOCAL_CONTENTS, NULL_NAME, NULL_PATH, NULL_STRING, PATH_OUTSIDE_PROJECT, READ_ONLY, RELATIVE_PATH, TARGET_EXCEPTION, UNKNOWN_JAVADOC_FORMAT, UPDATE_CONFLICT
 
Fields inherited from interface org.eclipse.core.resources.IResourceStatus
BUILD_FAILED, CASE_VARIANT_EXISTS, EXISTS_LOCAL, FAILED_DELETE_LOCAL, FAILED_DELETE_METADATA, FAILED_DESCRIBING_CONTENTS, FAILED_GETTING_CHARSET, FAILED_READ_LOCAL, FAILED_READ_METADATA, FAILED_SETTING_CHARSET, FAILED_WRITE_LOCAL, FAILED_WRITE_METADATA, INTERNAL_ERROR, INVALID_NATURE_SET, INVALID_RESOURCE_NAME, INVALID_VALUE, LINKING_NOT_ALLOWED, MARKER_NOT_FOUND, MISSING_DESCRIPTION_REPAIRED, NO_LOCATION_LOCAL, NOT_FOUND_LOCAL, OPERATION_FAILED, OUT_OF_SYNC_LOCAL, OVERLAPPING_LOCATION, PARENT_READ_ONLY, PARTNER_NOT_REGISTERED, PATH_OCCUPIED, PROJECT_NOT_OPEN, READ_ONLY_LOCAL, RESOURCE_EXISTS, RESOURCE_NOT_FOUND, RESOURCE_NOT_LINKED, RESOURCE_NOT_LOCAL, RESOURCE_WRONG_TYPE, VARIABLE_NOT_DEFINED, VARIABLE_NOT_DEFINED_WARNING, WORKSPACE_LOCKED, WORKSPACE_NOT_OPEN, WRONG_TYPE_LOCAL
 
Fields inherited from interface org.eclipse.core.runtime.IStatus
CANCEL, ERROR, INFO, OK, WARNING
 
Constructor Summary
JavaModelStatus()
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(org.eclipse.core.runtime.CoreException coreException)
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(int code)
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(int code, IJavaElement element)
          Constructs an Java model status with the given corresponding element.
JavaModelStatus(int code, IJavaElement[] elements)
          Constructs an Java model status with the given corresponding elements.
JavaModelStatus(int code, IJavaElement element, org.eclipse.core.runtime.IPath path)
          Constructs an Java model status with the given corresponding element and path
JavaModelStatus(int code, IJavaElement element, org.eclipse.core.runtime.IPath path, java.lang.String string)
          Constructs an Java model status with the given corresponding element, path and string
JavaModelStatus(int code, IJavaElement element, java.lang.String string)
          Constructs an Java model status with the given corresponding element and string
JavaModelStatus(int severity, int code, IJavaElement element, org.eclipse.core.runtime.IPath path, java.lang.String msg)
          Constructs an Java model status with the given corresponding element and path
JavaModelStatus(int severity, int code, java.lang.String string)
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(int code, org.eclipse.core.runtime.IPath path)
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(int code, java.lang.String string)
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(int code, java.lang.Throwable throwable)
          Constructs an Java model status with no corresponding elements.
 
Method Summary
 org.eclipse.core.runtime.IStatus[] getChildren()
           
 IJavaElement[] getElements()
          Returns any Java elements associated with the failure (see specification of the status code), or an empty array if no elements are related to this particular status code.
 java.lang.String getMessage()
          Returns the message that is relevant to the code of this status.
 org.eclipse.core.runtime.IPath getPath()
          Returns the path associated with the failure (see specification of the status code), or null if the failure is not one of DEVICE_PATH, INVALID_PATH, PATH_OUTSIDE_PROJECT, or RELATIVE_PATH.
 int getSeverity()
           
 java.lang.String getString()
          Deprecated.  
 boolean isDoesNotExist()
          Returns whether this status indicates that a Java model element does not exist.
 boolean isMultiStatus()
           
 boolean isOK()
           
 boolean matches(int mask)
           
static IJavaModelStatus newMultiStatus(IJavaModelStatus[] children)
          Creates and returns a new IJavaModelStatus that is a a multi-status status.
 java.lang.String toString()
          Returns a printable representation of this exception for debugging purposes.
 
Methods inherited from class org.eclipse.core.runtime.Status
getCode, getException, getPlugin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.core.runtime.IStatus
getCode, getException, getPlugin
 

Field Detail

VERIFIED_OK

public static final IJavaModelStatus VERIFIED_OK
Singleton OK object

Constructor Detail

JavaModelStatus

public JavaModelStatus()
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int code)
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement[] elements)
Constructs an Java model status with the given corresponding elements.


JavaModelStatus

public JavaModelStatus(int code,
                       java.lang.String string)
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int severity,
                       int code,
                       java.lang.String string)
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int code,
                       java.lang.Throwable throwable)
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int code,
                       org.eclipse.core.runtime.IPath path)
Constructs an Java model status with no corresponding elements.


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement element)
Constructs an Java model status with the given corresponding element.


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement element,
                       java.lang.String string)
Constructs an Java model status with the given corresponding element and string


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement element,
                       org.eclipse.core.runtime.IPath path)
Constructs an Java model status with the given corresponding element and path


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement element,
                       org.eclipse.core.runtime.IPath path,
                       java.lang.String string)
Constructs an Java model status with the given corresponding element, path and string


JavaModelStatus

public JavaModelStatus(int severity,
                       int code,
                       IJavaElement element,
                       org.eclipse.core.runtime.IPath path,
                       java.lang.String msg)
Constructs an Java model status with the given corresponding element and path


JavaModelStatus

public JavaModelStatus(org.eclipse.core.runtime.CoreException coreException)
Constructs an Java model status with no corresponding elements.

Method Detail

getChildren

public org.eclipse.core.runtime.IStatus[] getChildren()
Specified by:
getChildren in interface org.eclipse.core.runtime.IStatus
Overrides:
getChildren in class org.eclipse.core.runtime.Status
See Also:
IStatus

getElements

public IJavaElement[] getElements()
Description copied from interface: IJavaModelStatus
Returns any Java elements associated with the failure (see specification of the status code), or an empty array if no elements are related to this particular status code.

Specified by:
getElements in interface IJavaModelStatus
Returns:
the list of Java element culprits
See Also:
IJavaModelStatus

getMessage

public java.lang.String getMessage()
Returns the message that is relevant to the code of this status.

Specified by:
getMessage in interface org.eclipse.core.runtime.IStatus
Overrides:
getMessage in class org.eclipse.core.runtime.Status

getPath

public org.eclipse.core.runtime.IPath getPath()
Description copied from interface: IJavaModelStatus
Returns the path associated with the failure (see specification of the status code), or null if the failure is not one of DEVICE_PATH, INVALID_PATH, PATH_OUTSIDE_PROJECT, or RELATIVE_PATH.

Specified by:
getPath in interface IResourceStatus
Specified by:
getPath in interface IJavaModelStatus
Returns:
the path that caused the failure, or null if none
See Also:
IJavaModelStatus.getPath()

getSeverity

public int getSeverity()
Specified by:
getSeverity in interface org.eclipse.core.runtime.IStatus
Overrides:
getSeverity in class org.eclipse.core.runtime.Status
See Also:
IStatus.getSeverity()

getString

public java.lang.String getString()
Deprecated. 

Description copied from interface: IJavaModelStatus
Returns the string associated with the failure (see specification of the status code), or null if no string is related to this particular status code.

Specified by:
getString in interface IJavaModelStatus
Returns:
the string culprit, or null if none
See Also:
IJavaModelStatus.getString()

isDoesNotExist

public boolean isDoesNotExist()
Description copied from interface: IJavaModelStatus
Returns whether this status indicates that a Java model element does not exist. This convenience method is equivalent to getCode() == IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST.

Specified by:
isDoesNotExist in interface IJavaModelStatus
Returns:
true if the status code indicates that a Java model element does not exist
See Also:
IJavaModelStatus.isDoesNotExist()

isMultiStatus

public boolean isMultiStatus()
Specified by:
isMultiStatus in interface org.eclipse.core.runtime.IStatus
Overrides:
isMultiStatus in class org.eclipse.core.runtime.Status
See Also:
IStatus.isMultiStatus()

isOK

public boolean isOK()
Specified by:
isOK in interface org.eclipse.core.runtime.IStatus
Overrides:
isOK in class org.eclipse.core.runtime.Status
See Also:
IStatus.isOK()

matches

public boolean matches(int mask)
Specified by:
matches in interface org.eclipse.core.runtime.IStatus
Overrides:
matches in class org.eclipse.core.runtime.Status
See Also:
IStatus.matches(int)

newMultiStatus

public static IJavaModelStatus newMultiStatus(IJavaModelStatus[] children)
Creates and returns a new IJavaModelStatus that is a a multi-status status.

See Also:
IStatus.isMultiStatus()

toString

public java.lang.String toString()
Returns a printable representation of this exception for debugging purposes.

Overrides:
toString in class org.eclipse.core.runtime.Status