Package org.aspectj.org.eclipse.jdt.core
Klasse JavaModelException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.core.runtime.CoreException
org.aspectj.org.eclipse.jdt.core.JavaModelException
- Alle implementierten Schnittstellen:
Serializable
public class JavaModelException
extends org.eclipse.core.runtime.CoreException
A checked exception representing a failure in the Java model.
Java model exceptions contain a Java-specific status object describing the
cause of the exception.
Instances of this class are automatically created by the Java model when problems arise, so there is generally no need for clients to create instances.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungJavaModelException(Throwable e, int code) Creates a Java model exception that wrappers the givenThrowable.JavaModelException(IJavaModelStatus status) Creates a Java model exception for the given Java-specific status object.JavaModelException(org.eclipse.core.runtime.CoreException exception) Creates a Java model exception for the givenCoreException.JavaModelException(org.eclipse.core.runtime.IStatus status) Creates a Java model exception for the given status object. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the underlyingThrowablethat caused the failure.Returns the Java model status object for this exception.booleanReturns whether this exception indicates that a Java model element does not exist.voidprintStackTrace(PrintStream output) Prints this exception's stack trace to the given print stream.voidprintStackTrace(PrintWriter output) Prints this exception's stack trace to the given print writer.toString()Von Klasse geerbte Methoden org.eclipse.core.runtime.CoreException
getCause, getStatus, printStackTraceVon Klasse geerbte Methoden java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Konstruktordetails
-
JavaModelException
Creates a Java model exception that wrappers the givenThrowable. The exception contains a Java-specific status object with severityIStatus.ERRORand the given status code.- Parameter:
e- theThrowablecode- one of the Java-specific status codes declared inIJavaModelStatusConstants- Siehe auch:
-
IJavaModelStatusConstantsIStatus.ERROR
-
JavaModelException
public JavaModelException(org.eclipse.core.runtime.CoreException exception) Creates a Java model exception for the givenCoreException. Equivalent toJavaModelException(exception,IJavaModelStatusConstants.CORE_EXCEPTION.- Parameter:
exception- theCoreException
-
JavaModelException
Creates a Java model exception for the given Java-specific status object.- Parameter:
status- the Java-specific status object
-
JavaModelException
public JavaModelException(org.eclipse.core.runtime.IStatus status) Creates a Java model exception for the given status object.- Seit:
- 3.14
-
-
Methodendetails
-
getException
Returns the underlyingThrowablethat caused the failure.- Gibt zurück:
- the wrapped
Throwable, ornullif the direct case of the failure was at the Java model layer
-
getJavaModelStatus
Returns the Java model status object for this exception. Equivalent to(IJavaModelStatus) getStatus().- Gibt zurück:
- a status object
-
isDoesNotExist
public boolean isDoesNotExist()Returns whether this exception indicates that a Java model element does not exist. Such exceptions have a status with a code ofIJavaModelStatusConstants.ELEMENT_DOES_NOT_EXISTorIJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH. This is a convenience method.- Gibt zurück:
trueif this exception indicates that a Java model element does not exist- Siehe auch:
-
printStackTrace
Prints this exception's stack trace to the given print stream.- Setzt außer Kraft:
printStackTracein Klasseorg.eclipse.core.runtime.CoreException- Parameter:
output- the print stream- Seit:
- 3.0
-
printStackTrace
Prints this exception's stack trace to the given print writer.- Setzt außer Kraft:
printStackTracein Klasseorg.eclipse.core.runtime.CoreException- Parameter:
output- the print writer- Seit:
- 3.0
-
toString
-