att.grappa
Interface AttributeHandler

All Known Implementing Classes:
Attribute

public interface AttributeHandler

An interface for methods that perform attribute value conversions.

Version:
1.2, 21 Aug 2005; Copyright 1996 - 2005 by AT&T Corp.
Author:
John Mocenigo, Research @ AT&T Labs

Method Summary
 java.lang.Object convertStringValue(int elemType, java.lang.String name, java.lang.String stringValue, int convType)
          Convert the supplied string value to the appropriate Object.
 java.lang.String convertValue(int elemType, java.lang.String name, java.lang.Object value, int convType)
          Convert the supplied value to a string.
 java.lang.Object copyValue(int elemType, java.lang.String name, java.lang.Object value, int convType)
          Make a copy of the supplied value.
 

Method Detail

convertValue

java.lang.String convertValue(int elemType,
                              java.lang.String name,
                              java.lang.Object value,
                              int convType)
Convert the supplied value to a string. How to convert the value is based on the type, name and attrtype information supplied. Note: this method really could be declared static except that it hides the instance method declared in the AttributeHandler interface and a class method cannot hide an instance method.

Parameters:
elemType - the element type to which the named attribute applies
name - the name of the attribute
value - the object value to be converted to a string
convType - the object-to-string conversion type of the value object
Returns:
a string representation of the supplied value

convertStringValue

java.lang.Object convertStringValue(int elemType,
                                    java.lang.String name,
                                    java.lang.String stringValue,
                                    int convType)
Convert the supplied string value to the appropriate Object. How to convert the value is based on the type, name and attrtype information supplied. Note: this method really could be declared static except that it hides the instance method declared in the AttributeHandler interface and a class method cannot hide an instance method.

Parameters:
elemType - the element type to which the named attribute applies
name - the name of the attribute
value - the string value to be converted to an object
convType - the string-to-object conversion type of the value object
Returns:
an object representation of the supplied value

copyValue

java.lang.Object copyValue(int elemType,
                           java.lang.String name,
                           java.lang.Object value,
                           int convType)
Make a copy of the supplied value. How to copy the value is based on the type, name and attrtype information supplied. Note: this method really could be declared static except that it hides the instance method declared in the AttributeHandler interface and a class method cannot hide an instance method.

Parameters:
elemType - the element type to which the named attribute applies
name - the name of the attribute
value - the attribute value to be copied
convType - the conversion type of the value object
Returns:
a copy of the supplied value