org.apache.commons.jelly.tags.core

## Class NewTag

- java.lang.Object
- - org.apache.commons.jelly.TagSupport
  - - org.apache.commons.jelly.tags.core.BaseClassLoaderTag
    - - org.apache.commons.jelly.tags.core.NewTag

All Implemented Interfaces:
  Tag, ArgTagParent

    public class NewTag
    extends BaseClassLoaderTag
    implements ArgTagParent

A tag which creates a new object of the given type

Version:
  $Revision: 155420 $
Author:
  James Strachan

### Field Summary

### Fields inherited from class org.apache.commons.jelly.tags.core.BaseClassLoaderTag

`classLoader, useContextClassLoader`

### Fields inherited from class org.apache.commons.jelly.TagSupport

`body, context, parent`

### Constructor Summary

Constructors
Constructor and Description
`NewTag()`

### Method Summary

Methods
`void` `addArgument(Class type, Object value)`
`void` `doTag(XMLOutput output)` Evaluates this tag after all the tags properties have been initialized.
`void` `setClassName(String className)` Sets the class name of the object to instantiate
`void` `setVar(String var)` Sets the name of the variable exported by this tag

### Methods inherited from class org.apache.commons.jelly.tags.core.BaseClassLoaderTag

`getClassLoader, getUseContextClassLoader, setClassLoader, setUseContextClassLoader`

### Methods inherited from class org.apache.commons.jelly.TagSupport

`findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### NewTag

    public NewTag()

### Method Detail

#### setVar

    public void setVar(String var)

Sets the name of the variable exported by this tag

#### setClassName

    public void setClassName(String className)

Sets the class name of the object to instantiate

#### addArgument

    public void addArgument(Class type,
                   Object value)

Specified by:
  `addArgument` in interface `ArgTagParent`

#### doTag

    public void doTag(XMLOutput output)
               throws MissingAttributeException,
                      JellyTagException

Description copied from interface: `Tag`
Evaluates this tag after all the tags properties have been initialized.

Specified by:
  `doTag` in interface `Tag`
Throws:
  `MissingAttributeException`
  `JellyTagException`