com.unitesk.atp.dynattrs
Class AttributePathException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.unitesk.atp.dynattrs.AttributePathException
All Implemented Interfaces:
Serializable

public class AttributePathException
extends RuntimeException

This exception reports about various problems while getting attribute value by attribute path: syntax errors in attribute path, wrong attribute names etc. Exception provides information about object and attribute. A cause of exception contains additional information.

Version:
$Id: AttributePathException.java,v 1.2 2004/10/11 15:00:41 all-x Exp $
Author:
Alexey Demakov
See Also:
Accessor.getAttribute( Object,String,Attributed), Serialized Form

Field Summary
static int ATTRIBUTED_EXCEPTION
          Various problems with attributes.
static int INDEX_VALUE
          Problem with index value - it is not integer.
protected  int kind
           
static int NO_CLOSING_BRACKET
          No closing bracket for open bracket at position pos.
protected  Object obj
           
protected  String path
           
protected  int pos
           
 
Constructor Summary
AttributePathException(int kind, Object obj, String path, int pos, Throwable cause)
          Creates an exception with the specified parameters.
 
Method Summary
 int getKind()
           
 String getKindString()
           
 String getMessage()
           
 Object getObject()
           
 String getPath()
           
 int getPos()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_CLOSING_BRACKET

public static final int NO_CLOSING_BRACKET
No closing bracket for open bracket at position pos. The cause is null.

See Also:
Constant Field Values

INDEX_VALUE

public static final int INDEX_VALUE
Problem with index value - it is not integer. The cause is ClassCastException (index variable has not Integer value) or NumberFormatException (index expression is not valid integer).

See Also:
Constant Field Values

ATTRIBUTED_EXCEPTION

public static final int ATTRIBUTED_EXCEPTION
Various problems with attributes. Wrong name etc. Position of attribute name is in pos, the cause is underlying AttributeException. Note that index variables are attributes of variableMap, so they also can be causes of AttributeException.

See Also:
Constant Field Values

kind

protected int kind

obj

protected Object obj

path

protected String path

pos

protected int pos
Constructor Detail

AttributePathException

public AttributePathException(int kind,
                              Object obj,
                              String path,
                              int pos,
                              Throwable cause)
Creates an exception with the specified parameters.

Parameters:
kind - Error kind one of {link #NO_CLOSING_BRACKET}, {link #INDEX_VALUE}, {link #ATTRIBUTED_EXCEPTION}.
obj - Attributed object.
path - Attribute path.
pos - Error position (starting from 0).
cause - Cause of this exception.
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getKind

public int getKind()
Returns:
Error kind.

getKindString

public String getKindString()

getObject

public Object getObject()
Returns:
Attributed object.

getPath

public String getPath()
Returns:
Attribute path.

getPos

public int getPos()
Returns:
Error position in path.


Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.