Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.servlet.jsp.tagext
Class TagData

    java.lang.Object
      |
      +--javax.servlet.jsp.tagext.TagData

public class TagData
extends java.lang.Object
implements java.lang.Cloneable

Tag instance attribute(s)/value(s); often this data is fully static in the case where none of the attributes have runtime expresssions as their values. Thus this class is intended to expose an immutable interface to a set of immutable attribute/value pairs. This class is cloneable so implementations can create a static instance and then just clone it before adding the request-time expressions.

Field Summary
`static java.lang.Object` | `REQUEST_TIME_VALUE` Distinguished value for an attribute to indicate its value is a request-time expression which is not yet available because this TagData instance is being used at translation-time.

Constructor Summary
`TagData(java.util.Hashtable attrs)` Constructor for a TagData If you already have the attributes in a hashtable, use this constructor.
`TagData(java.lang.Object[][] atts)` Constructor for a TagData For simplicity and speed, we are just using primitive types.

Method Summary
`java.lang.Object` | `getAttribute(java.lang.String attName)`
`java.util.Enumeration` | `getAttributes()` Enumerates the attributes
`java.lang.String` | `getAttributeString(java.lang.String attName)`
`java.lang.String` | `getId()`
`void` | `setAttribute(java.lang.String attName, java.lang.Object value)` Set the value of this attribute to be

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### REQUEST_TIME_VALUE

    public static final java.lang.Object REQUEST_TIME_VALUE

  Distinguished value for an attribute to indicate its value is a request-time expression which is not yet available because this TagData instance is being used at translation-time.

Constructor Detail

### TagData

    public TagData(java.lang.Object[][] atts)

  Constructor for a TagData For simplicity and speed, we are just using primitive types. A typical constructor may be static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}}; static final TagData td = new TagData(att); In an implementation that uses the clonable approach sketched above all values must be Strings except for those holding the distinguished object REQUEST_TIME_VALUE.
  Parameters:
    `atts` - the static attribute and values. May be null.

### TagData

    public TagData(java.util.Hashtable attrs)

  Constructor for a TagData If you already have the attributes in a hashtable, use this constructor.

Method Detail

### getId

    public java.lang.String getId()

  Returns:
    the value of the id attribute or null

### getAttribute

    public java.lang.Object getAttribute(java.lang.String attName)

  Returns:
    the attribute's value object. Returns the distinguished object REQUEST_TIME_VALUE if the value is request time and we are using TagData at translation time. Returns null if the attribute is not set.

### setAttribute

    public void setAttribute(java.lang.String attName,
                             java.lang.Object value)

  Set the value of this attribute to be

### getAttributeString

    public java.lang.String getAttributeString(java.lang.String attName)

  Returns:
    the attribute value string

### getAttributes

    public java.util.Enumeration getAttributes()

  Enumerates the attributes
  Returns:
    An enumeration of the attributes in a TagData

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2001 The Apache Software Foundation. All Rights Reserved.