public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { invokeBody(output); if (name == null) { throw new MissingAttributeException("name"); } if (dynaClass == null) { throw new MissingAttributeException("dynaClass"); } final DynaClass theDynaClass = dynaClass; final Map beanAttributes = (attributes != null) ? attributes : EMPTY_MAP; TagFactory factory = new TagFactory() { public Tag createTag(String name, Attributes attributes) { return new DynamicDynaBeanTag(theDynaClass, beanAttributes, varAttribute); } }; getTagLibrary().registerBeanTag(name, factory); // now lets clear the attributes for next invocation and help the GC attributes = null; }
getTagLibrary().registerBeanTag(name, factory);