[jboss-dev-forums] [Design of POJO Server] - Re: Current behavior of DeploymentUnit.getAttachment
scott.stark@jboss.org
do-not-reply at jboss.com
Sun Nov 12 17:05:25 EST 2006
For now I just added a helper class that provides the desired child to parent search logic:
| package org.jboss.deployers.plugins.deployers.helpers;
|
| import org.jboss.deployers.spi.deployer.DeploymentUnit;
| import org.jboss.deployers.spi.structure.DeploymentContext;
|
| /**
| * Search a DeploymentUnit structure from child to parent for a matching
| * attachment.
| *
| * @author Scott.Stark at jboss.org
| * @version $Revision:$
| */
| public class AttachmentLocator
| {
| static public Object search(DeploymentUnit unit, String name)
| {
| ...
| }
|
| static public <T> T search(DeploymentUnit unit, String name, Class<T> expectedType)
| {
| ...
| }
|
| static public <T> T search(DeploymentUnit unit, Class<T> type)
| {
| ...
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985280#3985280
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985280
More information about the jboss-dev-forums
mailing list