Package com.iizix.prop
Class GError
java.lang.Object
com.iizix.prop.GError
- All Implemented Interfaces:
- Cloneable,- Comparable<GError>
This is a data holder class for property errors.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- static enumThe error source.- static enumThe error types.
- Field SummaryFieldsModifier and TypeFieldDescription- final GError.SourceThe error source.- final GError.TypeThe error type.
- Constructor SummaryConstructorsConstructorDescription- GError- (GError.Type type, GError.Source source, String propertyName, String propertyItem, String description) Creates a new error object without quick fixes.- GError- (GError.Type type, GError.Source source, String propertyName, String propertyItem, String description, QuickFix[] quickFixes) Creates a new error object.Creates a new error object from an XML element.
- Method SummaryModifier and TypeMethodDescription- intUsed for sorting errors.- booleanChecks if two errors are equal, that is that they represent the same error cause.Gets the description of the error.Gets the property item of the source property that is the cause of the error.Gets the property name that is the cause of the error.- QuickFix[]Gets a copy of the quick fixes.- getType()Gets the type.- voidSaves the error to XML.
- Field Details- typeThe error type.
- sourceThe error source.
 
- Constructor Details- GErrorpublic GError- (GError.Type type, GError.Source source, String propertyName, String propertyItem, String description) Creates a new error object without quick fixes.- Parameters:
- type- The error type.
- source- The error source.
- propertyName- The property name.
- propertyItem- The property item, null for none.
- description- The description of the error.
- Throws:
- NullPointerException- If type, source, propertyName, description or a quickFix array item is null.
 
- GErrorpublic GError- (GError.Type type, GError.Source source, String propertyName, String propertyItem, String description, QuickFix[] quickFixes) Creates a new error object.- Parameters:
- type- The error type.
- source- The error source.
- propertyName- The property name.
- propertyItem- The property item, null for none.
- description- The description of the error.
- quickFixes- Array of quick fixes, null for none.
- Throws:
- NullPointerException- If type, source, propertyName, description or a quickFix array item is null.
 
- GErrorCreates a new error object from an XML element.- Parameters:
- element- The element.
- Throws:
- Exception- For errors in XML or quick-fix classes.
 
 
- Method Details- getTypeGets the type.
- getPropertyNameGets the property name that is the cause of the error.
- getPropertyItemGets the property item of the source property that is the cause of the error.- Returns:
- The item name, or null for none.
 
- getDescriptionGets the description of the error.
- getQuickFixesGets a copy of the quick fixes.- Returns:
- a cloned array of quick-fixes, or null if none are present.
 
- saveToSaves the error to XML.
- equalsChecks if two errors are equal, that is that they represent the same error cause. Comparison is done by type, source, property name, property item (if present), and description. Quick fixes are not checked.
- compareToUsed for sorting errors.- Specified by:
- compareToin interface- Comparable<GError>