org.aspectj.org.eclipse.jdt.internal.core
Class JavaModelStatus

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

public class JavaModelStatus
extends Status
implements IJavaModelStatus, IJavaModelStatusConstants

See Also:
IJavaModelStatus

Field Summary
protected  IStatus[] children
           
protected  IJavaElement[] elements
          The elements related to the failure, or null if no elements are involved.
protected static IStatus[] NO_CHILDREN
          Empty children
protected  IPath path
          The path related to the failure, or null if no path is involved.
protected  java.lang.String string
          The String related to the failure, or null if no String is involved.
static IJavaModelStatus VERIFIED_OK
          Singleton OK object
 
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_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, OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, PATH_OUTSIDE_PROJECT, READ_ONLY, RELATIVE_PATH, TARGET_EXCEPTION, UNKNOWN_JAVADOC_FORMAT, UPDATE_CONFLICT
 
Constructor Summary
JavaModelStatus()
          Constructs an Java model status with no corresponding elements.
JavaModelStatus(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[] elements)
          Constructs an Java model status with the given corresponding elements.
JavaModelStatus(int code, IJavaElement element, IPath path)
          Constructs an Java model status with the given corresponding element and path
JavaModelStatus(int code, IJavaElement element, 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, 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, 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
protected  int getBits()
           
 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.
 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)
           
protected  boolean matches(JavaModelStatus status, int mask)
          Helper for matches(int).
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

elements

protected IJavaElement[] elements
The elements related to the failure, or null if no elements are involved.


path

protected IPath path
The path related to the failure, or null if no path is involved.


string

protected java.lang.String string
The String related to the failure, or null if no String is involved.


NO_CHILDREN

protected static final IStatus[] NO_CHILDREN
Empty children


children

protected IStatus[] children

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,
                       IPath path)
Constructs an Java model status with no corresponding elements.


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,
                       IPath path)
Constructs an Java model status with the given corresponding element and path


JavaModelStatus

public JavaModelStatus(int code,
                       IJavaElement element,
                       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,
                       IPath path,
                       java.lang.String msg)
Constructs an Java model status with the given corresponding element and path


JavaModelStatus

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

Method Detail

getBits

protected int getBits()

getChildren

public IStatus[] getChildren()
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.


getPath

public 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 IJavaModelStatus
Returns:
the path that caused the failure, or null if none
See Also:
IJavaModelStatus.getPath()

getSeverity

public int getSeverity()
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()
See Also:
IStatus#isMultiStatus()

isOK

public boolean isOK()
See Also:
IStatus#isOK()

matches

public boolean matches(int mask)
See Also:
IStatus#matches(int)

matches

protected boolean matches(JavaModelStatus status,
                          int mask)
Helper for 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.