Class JavaModelStatus
java.lang.Object
org.eclipse.core.runtime.Status
org.aspectj.org.eclipse.jdt.internal.core.JavaModelStatus
- All Implemented Interfaces:
IJavaModelStatus
,IJavaModelStatusConstants
,org.eclipse.core.runtime.IStatus
public class JavaModelStatus
extends org.eclipse.core.runtime.Status
implements IJavaModelStatus, IJavaModelStatusConstants
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.eclipse.core.runtime.IStatus[]
protected IJavaElement[]
The elements related to the failure, ornull
if no elements are involved.protected static final org.eclipse.core.runtime.IStatus[]
Empty childrenprotected org.eclipse.core.runtime.IPath
The path related to the failure, ornull
if no path is involved.protected String
TheString
related to the failure, ornull
if noString
is involved.static final IJavaModelStatus
Singleton OK objectFields inherited from class org.eclipse.core.runtime.Status
CANCEL_STATUS, OK_STATUS
Fields inherited from interface org.aspectj.org.eclipse.jdt.core.IJavaModelStatusConstants
BAD_TEXT_EDIT_LOCATION, BUILDER_INITIALIZATION_ERROR, BUILDER_SERIALIZATION_ERROR, CANNOT_RETRIEVE_ATTACHED_JAVADOC, CANNOT_RETRIEVE_ATTACHED_JAVADOC_TIMEOUT, CLASSPATH_CYCLE, COMPILER_FAILURE, CORE_EXCEPTION, CP_CONTAINER_PATH_UNBOUND, CP_INVALID_EXTERNAL_ANNOTATION_PATH, 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, MAIN_ONLY_PROJECT_DEPENDS_ON_TEST_ONLY_PROJECT, NAME_COLLISION, NO_ELEMENTS_TO_PROCESS, NO_LOCAL_CONTENTS, NULL_NAME, NULL_PATH, NULL_STRING, OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, PATH_OUTSIDE_PROJECT, READ_ONLY, RELATIVE_PATH, TARGET_EXCEPTION, TEST_OUTPUT_FOLDER_MUST_BE_SEPARATE_FROM_MAIN_OUTPUT_FOLDERS, TEST_SOURCE_REQUIRES_SEPARATE_OUTPUT_LOCATION, UNKNOWN_JAVADOC_FORMAT, UPDATE_CONFLICT
Fields inherited from interface org.eclipse.core.runtime.IStatus
CANCEL, ERROR, INFO, OK, WARNING
-
Constructor Summary
ConstructorDescriptionConstructs an Java model status with no corresponding elements.JavaModelStatus
(int code) Constructs an Java model status with no corresponding elements.JavaModelStatus
(int severity, int code, String string) Constructs an Java model status with no corresponding elements.JavaModelStatus
(int severity, int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String msg) Constructs an Java model status with the given corresponding element and pathJavaModelStatus
(int code, String string) Constructs an Java model status with no corresponding elements.JavaModelStatus
(int code, Throwable throwable) 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, String string) Constructs an Java model status with the given corresponding element and stringJavaModelStatus
(int code, IJavaElement element, org.eclipse.core.runtime.IPath path) Constructs an Java model status with the given corresponding element and pathJavaModelStatus
(int code, IJavaElement element, org.eclipse.core.runtime.IPath path, String string) Constructs an Java model status with the given corresponding element, path and stringJavaModelStatus
(int code, org.eclipse.core.runtime.IPath path) 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. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
getBits()
org.eclipse.core.runtime.IStatus[]
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.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), ornull
if the failure is not one ofDEVICE_PATH
,INVALID_PATH
,PATH_OUTSIDE_PROJECT
, orRELATIVE_PATH
.int
Deprecated.boolean
Returns whether this status indicates that a Java model element does not exist.boolean
boolean
isOK()
boolean
matches
(int mask) protected boolean
matches
(JavaModelStatus status, int mask) Helper for matches(int).static IJavaModelStatus
newMultiStatus
(IJavaModelStatus[] children) Creates and returns a newIJavaModelStatus
that is a a multi-status status.toString()
Returns a printable representation of this exception for debugging purposes.Methods inherited from class org.eclipse.core.runtime.Status
error, error, getCode, getException, getPlugin, info, setCode, setException, setMessage, setPlugin, setSeverity, warning, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.core.runtime.IStatus
getCode, getException, getPlugin
-
Field Details
-
elements
The elements related to the failure, ornull
if no elements are involved. -
path
protected org.eclipse.core.runtime.IPath pathThe path related to the failure, ornull
if no path is involved. -
string
TheString
related to the failure, ornull
if noString
is involved. -
NO_CHILDREN
protected static final org.eclipse.core.runtime.IStatus[] NO_CHILDRENEmpty children -
children
protected org.eclipse.core.runtime.IStatus[] children -
VERIFIED_OK
Singleton OK object
-
-
Constructor Details
-
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
Constructs an Java model status with the given corresponding elements. -
JavaModelStatus
Constructs an Java model status with no corresponding elements. -
JavaModelStatus
Constructs an Java model status with no corresponding elements. -
JavaModelStatus
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
Constructs an Java model status with the given corresponding element. -
JavaModelStatus
Constructs an Java model status with the given corresponding element and string -
JavaModelStatus
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, 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, 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 Details
-
getBits
protected int getBits() -
getChildren
public org.eclipse.core.runtime.IStatus[] getChildren()- Specified by:
getChildren
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
getChildren
in classorg.eclipse.core.runtime.Status
- See Also:
-
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 interfaceIJavaModelStatus
- Returns:
- the list of Java element culprits
- See Also:
-
getMessage
Returns the message that is relevant to the code of this status.- Specified by:
getMessage
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
getMessage
in classorg.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), ornull
if the failure is not one ofDEVICE_PATH
,INVALID_PATH
,PATH_OUTSIDE_PROJECT
, orRELATIVE_PATH
.- Specified by:
getPath
in interfaceIJavaModelStatus
- Returns:
- the path that caused the failure, or
null
if none - See Also:
-
getSeverity
public int getSeverity()- Specified by:
getSeverity
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
getSeverity
in classorg.eclipse.core.runtime.Status
- See Also:
-
getString
Deprecated.Description copied from interface:IJavaModelStatus
Returns the string associated with the failure (see specification of the status code), ornull
if no string is related to this particular status code.- Specified by:
getString
in interfaceIJavaModelStatus
- Returns:
- the string culprit, or
null
if none - See Also:
-
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 togetCode() == IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST
.- Specified by:
isDoesNotExist
in interfaceIJavaModelStatus
- Returns:
true
if the status code indicates that a Java model element does not exist- See Also:
-
isMultiStatus
public boolean isMultiStatus()- Specified by:
isMultiStatus
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
isMultiStatus
in classorg.eclipse.core.runtime.Status
- See Also:
-
isOK
public boolean isOK()- Specified by:
isOK
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
isOK
in classorg.eclipse.core.runtime.Status
- See Also:
-
matches
public boolean matches(int mask) - Specified by:
matches
in interfaceorg.eclipse.core.runtime.IStatus
- Overrides:
matches
in classorg.eclipse.core.runtime.Status
- See Also:
-
matches
Helper for matches(int). -
newMultiStatus
Creates and returns a newIJavaModelStatus
that is a a multi-status status.- See Also:
-
toString
Returns a printable representation of this exception for debugging purposes.- Overrides:
toString
in classorg.eclipse.core.runtime.Status
-