org.netbeans.modules.xml.xam.spi
Class Validator.ResultItem

java.lang.Object
  extended by org.netbeans.modules.xml.xam.spi.Validator.ResultItem
Enclosing interface:
Validator

public static class Validator.ResultItem
extends java.lang.Object


Constructor Summary
Validator.ResultItem(Validator validator, Validator.ResultType type, Component component, java.lang.String desc)
          Constructor to create an instance of ResultItem
Validator.ResultItem(Validator validator, Validator.ResultType type, java.lang.String desc, int lineNumber, int columnNumber, Model model)
          Constructor to create an instance of ResultItem
 
Method Summary
 int getColumnNumber()
          Column position of advice/warning/error.
 Component getComponents()
          Returns target component of the validation result.
 java.lang.String getDescription()
          Returns description of the validation result item.
 int getLineNumber()
          Line position of advice/warning/error.
 Model getModel()
          Model on which this ResultItem was reported on.
 Validator.ResultType getType()
          Returns type of validation result.
 Validator getValidator()
          Get the validator which generated this error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator.ResultItem

public Validator.ResultItem(Validator validator,
                            Validator.ResultType type,
                            Component component,
                            java.lang.String desc)
Constructor to create an instance of ResultItem

Parameters:
validator - Reference to validator.
type - Type of message.
component - Component to which this resultItem points.
desc - Message text string.

Validator.ResultItem

public Validator.ResultItem(Validator validator,
                            Validator.ResultType type,
                            java.lang.String desc,
                            int lineNumber,
                            int columnNumber,
                            Model model)
Constructor to create an instance of ResultItem

Parameters:
validator - Reference to validator.
type - Type of message.
desc - Message text string.
lineNumber - Line number where this error happens.
columnNumber - Column Number where this error happens.
model - Model on which this is reported.
Method Detail

getValidator

public Validator getValidator()
Get the validator which generated this error.

Returns:
The validator that generated this ResultItem.

getType

public Validator.ResultType getType()
Returns type of validation result.

Returns:
Type of message. Advice/Warning or Error.

getComponents

public Component getComponents()
Returns target component of the validation result.

Returns:
Component on which this validation result is reported. Return value can be null if the model is non-well formed, in this case use line/column numbers. Either getComponents() or getLineNumber/getColumnNumber() will be valid.

getDescription

public java.lang.String getDescription()
Returns description of the validation result item.

Returns:
Message describing advice/warning or error.

getLineNumber

public int getLineNumber()
Line position of advice/warning/error.

Returns:
Line number on which this ResultItem was reported on. Use Component if line number is -1. Either getComponents() or getLineNumber/getColumnNumber() will be valid.

getColumnNumber

public int getColumnNumber()
Column position of advice/warning/error.

Returns:
Column number on which this ResultItem was reported on. Use Component if column number is -1. Either getComponents() or getLineNumber/getColumnNumber() will be valid.

getModel

public Model getModel()
Model on which this ResultItem was reported on.

Returns:
Model