[jboss-dev-forums] [Design the new POJO MicroContainer] - Parsing more than one file
alesj
do-not-reply at jboss.com
Fri Mar 28 07:13:15 EDT 2008
What's the idea here:
- http://jira.jboss.com/jira/browse/JBDEPLOY-4
Should we currently just do this:
| if (files.size() == 0)
| {
| return null;
| }
| else if (files.size() > 1)
| {
| return parseMultipleFiles(files);
| }
| else
| {
| VirtualFile file = files.get(0);
| T result = parse(vfsDeploymentUnit, file, root);
| if (result != null)
| init(vfsDeploymentUnit, result, file);
| return result;
| }
| }
|
| /**
| * Handle multiple matching files.
| *
| * @param files the matching files
| * @return merged metadata or null if already handled
| * @throws Exception for any error
| */
| protected T parseMultipleFiles(List<VirtualFile> files) throws Exception
| {
| throw new DeploymentException("Handling multiple files not supported: " + files);
| }
|
and let every sub-parser deployer take care of it as it knows best?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139616#4139616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139616
More information about the jboss-dev-forums
mailing list