KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tirsen > nanning > jelly > InterfaceTag


1 /*
2  * Nanning Aspects
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package com.tirsen.nanning.jelly;
8
9 import org.apache.commons.jelly.JellyTagException;
10 import org.apache.commons.jelly.TagSupport;
11 import org.apache.commons.jelly.XMLOutput;
12
13 /**
14  * TODO document InterfaceTag
15  *
16  * <!-- $Id: InterfaceTag.java,v 1.6 2003/05/11 13:40:52 tirsen Exp $ -->
17  *
18  * @author $Author: tirsen $
19  * @version $Revision: 1.6 $
20  */

21 public class InterfaceTag extends TagSupport {
22     public void doTag(XMLOutput xmlOutput) throws JellyTagException {
23         try {
24             Class JavaDoc interfaceClass =
25                     Thread.currentThread().getContextClassLoader().loadClass(getBodyText().trim());
26             ((AspectTag) getParent()).setAspectInterface(interfaceClass);
27         } catch (ClassNotFoundException JavaDoc e) {
28             throw new JellyTagException(e);
29         }
30     }
31 }
32
Popular Tags