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

## xjavadoc
Class DefaultXTag

    java.lang.Object
      xjavadoc.DefaultXTag

All Implemented Interfaces:
  XTag

public class DefaultXTag
extends Object
implements XTag

Author:
  Aslak Hellesøy

Field Summary
`static int` | `instanceCount`

Constructor Summary
`DefaultXTag()`

Method Summary
`void` | `addTagListener(XTagListener tagListener)` add doc listener interested in chages
`boolean` | `equals(Object o)`
`protected void` | `fail(String message)` Utility method that should be called from `validate()` in case ov a validation failure.
`Collection` | `getAttributeNames()` Returns all tag parameters with the given name, or an empty List if none exist;
`String` | `getAttributeValue(String attributeName)` Returns the first tag parameter with the given name, or null if none exist;
`XDoc` | `getDoc()` Returns the XDoc object we belong to.
`String` | `getInfo()`
`int` | `getLineNumber()`
`String` | `getName()` Returns the full name of the tag, excluding the @
`String` | `getValue()` Returns the full value of the tag.
`int` | `hashCode()`
`(package private) void` | `init(String name, String value, XDoc doc, int lineNumber)` Sets the name and value.
`String` | `removeAttribute(String attributeName)` Removes an attribute
`void` | `removeTagListener(XTagListener tagListener)` remove doc listener
`void` | `setAttribute(String attributeName, String attributeValue)` Adds a parameter
`void` | `validate()` Validates the tag

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

Field Detail

### instanceCount

    public static int instanceCount

Constructor Detail

### DefaultXTag

    public DefaultXTag()

Method Detail

### getDoc

    public final XDoc getDoc()

  Description copied from interface: `XTag`
  Returns the XDoc object we belong to.

  Specified by:
    `getDoc` in interface `XTag`
  Returns:
    the XDoc object we belong to.

### getAttributeValue

    public final String getAttributeValue(String attributeName)

  Returns the first tag parameter with the given name, or null if none exist;

  Specified by:
    `getAttributeValue` in interface `XTag`
  Parameters:
    `attributeName` - Describe what the parameter does
  Returns:
    The Parameter value

### getAttributeNames

    public final Collection getAttributeNames()

  Returns all tag parameters with the given name, or an empty List if none exist;

  Specified by:
    `getAttributeNames` in interface `XTag`
  Returns:
    The Parameters value

### getName

    public final String getName()

  Returns the full name of the tag, excluding the @

  Specified by:
    `getName` in interface `XTag`
  Returns:
    tag name

### getValue

    public final String getValue()

  Returns the full value of the tag.

  Specified by:
    `getValue` in interface `XTag`
  Returns:
    full value of the tag

### getLineNumber

    public final int getLineNumber()

  Specified by:
    `getLineNumber` in interface `XTag`

### getInfo

    public final String getInfo()

  Specified by:
    `getInfo` in interface `XTag`

### setAttribute

    public final void setAttribute(String attributeName,
                                   String attributeValue)

  Adds a parameter

  Specified by:
    `setAttribute` in interface `XTag`
  Parameters:
    `attributeName` - The new Attribute value
    `attributeValue` - The new Attribute value

### addTagListener

    public final void addTagListener(XTagListener tagListener)

  add doc listener interested in chages

  Specified by:
    `addTagListener` in interface `XTag`
  Parameters:
    `tagListener` - The feature to be added to the TagListener attribute

### removeTagListener

    public final void removeTagListener(XTagListener tagListener)

  remove doc listener

  Specified by:
    `removeTagListener` in interface `XTag`
  Parameters:
    `tagListener` -

### removeAttribute

    public final String removeAttribute(String attributeName)

  Removes an attribute

  Specified by:
    `removeAttribute` in interface `XTag`
  Parameters:
    `attributeName` - atribute to remove
  Returns:
    the removed attribute value or null if it didn't exist

### equals

    public final boolean equals(Object o)

  Specified by:
    `equals` in interface `XTag`

### hashCode

    public final int hashCode()

  Specified by:
    `hashCode` in interface `XTag`

### validate

    public void validate()
                  throws TagValidationException

  Validates the tag

  Specified by:
    `validate` in interface `XTag`
  Throws:
    `TagValidationException`

### fail

    protected final void fail(String message)
                       throws TagValidationException

  Utility method that should be called from `validate()` in case ov a validation failure. Throws a new TagValidationException with

  Parameters:
    `message` - the message to include
  Throws:
    `TagValidationException` - always thrown.

### init

    final void init(String name,
                    String value,
                    XDoc doc,
                    int lineNumber)

  Sets the name and value. Called immediately after initialisation by XTagFactory. Don't call this method from anywhere else.

  Parameters:
    `name` -
    `value` -
    `doc` -
    `lineNumber` -

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

Copyright © 2002-2004 XDoclet Team. All Rights Reserved.