[jboss-dev-forums] [JBoss Microcontainer Development POJO Server] - Re: Scanning classes with VFS

Guillaume Grossetie do-not-reply at jboss.com
Fri Sep 10 21:53:29 EDT 2010


Guillaume Grossetie [http://community.jboss.org/people/grossetieg] created the discussion

"Re: Scanning classes with VFS"

To view the discussion, visit: http://community.jboss.org/message/561308#561308

--------------------------------------------------------------
Hi,

Thanks for the quick reply. I'm running JBoss 6.0.0.M3.
I will migrate to JBoss 6.0.0.M4 today to try the new scanning lib. I tried debugging :
URL resource = cld.getResource(pkgPath);
With +pkgPath = mypackage.etc.enumeration.action+, give me URL :

vfs:/home/g.grossetie/business/profiles/jboss-6.0.0.20100429-m3/server/default/deploy/deploy/1-calliope.ear/lib/framework-ejbimpl-2.0-SNAPSHOT-common.jar/mypackage/etc/enumeration/action/

I guess that my VirtualFile is created correctly. Then when I call :

file.getChildrenRecursively() 



    /**
     * Get all the children recursively<p>
     * <p/>
     * This always uses {@link VisitorAttributes#RECURSE}
     *
     * @return the children
     *
     * @throws IOException for any problem accessing the virtual file system
     * @throws IllegalStateException if the file is closed
     */
    public List<VirtualFile> getChildrenRecursively() throws IOException {
        return getChildrenRecursively(null);
    }
 
    /**
     * Get all the children recursively<p>
     * <p/>
     * This always uses {@link VisitorAttributes#RECURSE}
     *
     * @param filter to filter the children
     *
     * @return the children
     *
     * @throws IOException for any problem accessing the virtual file system
     * @throws IllegalStateException if the file is closed or it is a leaf node
     */
    public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException {
        if (!isDirectory())
            return Collections.emptyList();
        if (filter == null)
            filter = MatchAllVirtualFileFilter.INSTANCE;
        FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, VisitorAttributes.RECURSE);
        visit(visitor);
        return visitor.getMatched();
    }


the method return Collections.emptyList();


 if (!isDirectory())
            return Collections.emptyList();



So I can't interact with my classes because my package isn't a directory ?


Guillaume.
/**
     * Get all the children recursively<p>
     * <p/>
     * This always uses {@link VisitorAttributes#RECURSE}
     *
     * @return the children
     *
     * @throws IOException for any problem accessing the virtual file system
     * @throws IllegalStateException if the file is closed
     */
    public List<VirtualFile> getChildrenRecursively() throws IOException {
        return getChildrenRecursively(null);
    }
 
    /**
     * Get all the children recursively<p>
     * <p/>
     * This always uses {@link VisitorAttributes#RECURSE}
     *
     * @param filter to filter the children
     *
     * @return the children
     *
     * @throws IOException for any problem accessing the virtual file system
     * @throws IllegalStateException if the file is closed or it is a leaf node
     */
    public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException {
        if (!isDirectory())
            return Collections.emptyList();
        if (filter == null)
            filter = MatchAllVirtualFileFilter.INSTANCE;
        FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, VisitorAttributes.RECURSE);
        visit(visitor);
        return visitor.getMatched();
    }
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/561308#561308]

Start a new discussion in JBoss Microcontainer Development POJO Server at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2116]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100910/26059482/attachment.html 


More information about the jboss-dev-forums mailing list