agg.attribute.handler
Interface AttrHandler

All Superinterfaces:
java.io.Serializable

public interface AttrHandler
extends java.io.Serializable

This interface is implemented by Attribute Handlers; It provides services for the Attribute Manager.


Field Summary
static long serialVersionUID
           
 
Method Summary
 java.lang.String getName()
          Getting the name of this handler so an attribute manager can display it in the handlers' menu.
 HandlerExpr newHandlerExpr(HandlerType type, java.lang.String expr)
          Getting the expression handle by providing the type and a String-representation of the expression.
 HandlerType newHandlerType(java.lang.String typeString)
          Getting the type handle for a textual representation, for example "int" -> int.
 HandlerExpr newHandlerValue(HandlerType type, java.lang.Object value)
          Getting the expression handle by providing the type and an appropriate instance of the type.
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Getting the name of this handler so an attribute manager can display it in the handlers' menu.

Returns:
A (hopefully) meaningful name of the attribute handler.

newHandlerType

HandlerType newHandlerType(java.lang.String typeString)
                           throws AttrHandlerException
Getting the type handle for a textual representation, for example "int" -> int.

Parameters:
typeString - The textual representation for the type wanted.
Returns:
The handle for the requested type if such exists, null otherwise.
Throws:
AttrHandlerException - When the type cannot be found in the handler.

newHandlerExpr

HandlerExpr newHandlerExpr(HandlerType type,
                           java.lang.String expr)
                           throws AttrHandlerException
Getting the expression handle by providing the type and a String-representation of the expression.

Parameters:
type - A handle of one of the types created by 'newHandlerType()'.
Returns:
The handle for a newly created expression or...
Throws:
AttrHandlerException - When the expression String cannot be a representation of an expression of the given type.

newHandlerValue

HandlerExpr newHandlerValue(HandlerType type,
                            java.lang.Object value)
                            throws AttrHandlerException
Getting the expression handle by providing the type and an appropriate instance of the type.

Parameters:
type - A handle of one of the types created by 'newHandlerType()'.
Returns:
The handle for a newly created expression or...
Throws:
AttrHandlerException - When the instance is not of the required type.