|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ErrorType> dk.brics.xact.analysis.ErrorType
public enum ErrorType
Enum Constant Summary | |
---|---|
DISCARDED_RESULT
An operation like plug was used without using the result for anything, which is a typical bug pattern. |
|
EMPTY_RESULT
An XPath expression always returned an empty result. |
|
INVALID
An XML fragment might not satisfy the XML type it was expected to. |
|
INVALID_PLUG_TYPE
A plug or close operation might violate the type restriction on a gap |
|
MALFORMED_XML_CONSTANT
An XML constant in the program was malformed. |
|
MISSING_GAP
A plug operation had no effect because the specified gap is absent. |
|
NOT_UNIQUE_ROOT
XML.toDocument() was called on something that might not be well-formed
because it did not have a unique root element. |
|
OTHER
|
|
TEST_FAILS
An XPath boolean test is always false. |
|
UNSUPPORTED_OPERATION
An operation from the runtime system that the analysis can not yet handle was used. |
|
XML_IN_ATTRIBUTE
A gap might be plugged with XML data. |
Method Summary | |
---|---|
String |
getMessage()
Returns a short human-readable description of this error type. |
boolean |
isDefinite()
Returns true if an error of this type denotes something that will definitely be the case at runtime. |
static ErrorType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ErrorType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ErrorType DISCARDED_RESULT
x.plug(..); // reports warning x = x.plug(..); // this is probably the programmer meant
public static final ErrorType EMPTY_RESULT
public static final ErrorType INVALID
public static final ErrorType INVALID_PLUG_TYPE
public static final ErrorType MALFORMED_XML_CONSTANT
public static final ErrorType MISSING_GAP
public static final ErrorType NOT_UNIQUE_ROOT
XML.toDocument()
was called on something that might not be well-formed
because it did not have a unique root element.
public static final ErrorType OTHER
public static final ErrorType TEST_FAILS
public static final ErrorType UNSUPPORTED_OPERATION
public static final ErrorType XML_IN_ATTRIBUTE
Method Detail |
---|
public String getMessage()
public boolean isDefinite()
EMPTY_RESULT
is definite because the result
will definitely be empty every time at runtime. An error like INVALID
is not
definite because the XML may not be invalid every time during runtime, or may not even
be invalid at all, but was reported because the analysis failed to prove otherwise.
Talk of soundness usually only makes sense for the non-definite error types, but informally
one can say that it is wrong to report a definite error if there is not actually such an error.
public static ErrorType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static ErrorType[] values()
for (ErrorType c : ErrorType.values()) System.out.println(c);
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |