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
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.core.runtime.IStatus[]protected IJavaElement[]The elements related to the failure, ornullif no elements are involved.protected static final org.eclipse.core.runtime.IStatus[]Empty childrenprotected org.eclipse.core.runtime.IPathThe path related to the failure, ornullif no path is involved.protected StringTheStringrelated to the failure, ornullif noStringis involved.static final IJavaModelStatusSingleton OK objectFields inherited from class org.eclipse.core.runtime.Status
CANCEL_STATUS, OK_STATUSFields 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_CONFLICTFields inherited from interface org.eclipse.core.runtime.IStatus
CANCEL, ERROR, INFO, OK, WARNING -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 intgetBits()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.IPathgetPath()Returns the path associated with the failure (see specification of the status code), ornullif the failure is not one ofDEVICE_PATH,INVALID_PATH,PATH_OUTSIDE_PROJECT, orRELATIVE_PATH.intDeprecated.booleanReturns whether this status indicates that a Java model element does not exist.booleanbooleanisOK()booleanmatches(int mask) protected booleanmatches(JavaModelStatus status, int mask) Helper for matches(int).static IJavaModelStatusnewMultiStatus(IJavaModelStatus[] children) Creates and returns a newIJavaModelStatusthat 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, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IStatus
getCode, getException, getPlugin
-
Field Details
-
elements
The elements related to the failure, ornullif no elements are involved. -
path
protected org.eclipse.core.runtime.IPath pathThe path related to the failure, ornullif no path is involved. -
string
TheStringrelated to the failure, ornullif noStringis 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:
getChildrenin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getChildrenin classorg.eclipse.core.runtime.Status- See Also:
-
getElements
Description copied from interface:IJavaModelStatusReturns 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:
getElementsin 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:
getMessagein interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getMessagein classorg.eclipse.core.runtime.Status
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:IJavaModelStatusReturns the path associated with the failure (see specification of the status code), ornullif the failure is not one ofDEVICE_PATH,INVALID_PATH,PATH_OUTSIDE_PROJECT, orRELATIVE_PATH.- Specified by:
getPathin interfaceIJavaModelStatus- Returns:
- the path that caused the failure, or
nullif none - See Also:
-
getSeverity
public int getSeverity()- Specified by:
getSeverityin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
getSeverityin classorg.eclipse.core.runtime.Status- See Also:
-
getString
Deprecated.Description copied from interface:IJavaModelStatusReturns the string associated with the failure (see specification of the status code), ornullif no string is related to this particular status code.- Specified by:
getStringin interfaceIJavaModelStatus- Returns:
- the string culprit, or
nullif none - See Also:
-
isDoesNotExist
public boolean isDoesNotExist()Description copied from interface:IJavaModelStatusReturns 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:
isDoesNotExistin interfaceIJavaModelStatus- Returns:
trueif the status code indicates that a Java model element does not exist- See Also:
-
isMultiStatus
public boolean isMultiStatus()- Specified by:
isMultiStatusin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
isMultiStatusin classorg.eclipse.core.runtime.Status- See Also:
-
isOK
public boolean isOK()- Specified by:
isOKin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
isOKin classorg.eclipse.core.runtime.Status- See Also:
-
matches
public boolean matches(int mask) - Specified by:
matchesin interfaceorg.eclipse.core.runtime.IStatus- Overrides:
matchesin classorg.eclipse.core.runtime.Status- See Also:
-
matches
Helper for matches(int). -
newMultiStatus
Creates and returns a newIJavaModelStatusthat is a a multi-status status.- See Also:
-
toString
Returns a printable representation of this exception for debugging purposes.- Overrides:
toStringin classorg.eclipse.core.runtime.Status
-