public class XMLConstructorException extends IllegalArgumentException
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
In some situations, constructors for SBML objects may need to indicate
to callers that the creation of the object failed. The failure may be
for different reasons, such as an attempt to use invalid parameters or a
system condition such as a memory error. To communicate this to
callers, those classes will throw an XMLConstructorException
.
In languages that don't have an exception mechanism (e.g., C), the constructors generally try to return an error code instead of throwing an exception.
SBMLConstructorException
,
Serialized FormConstructor and Description |
---|
XMLConstructorException(String v)   |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Explicitly deletes the underlying native object.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public XMLConstructorException(String v)
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the XMLConstructorException.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke XMLConstructorException.delete()
themselves.