Class JBoss6VFS


  • public class JBoss6VFS
    extends VFS
    A JBoss6VFS.VFS implementation that works with the VFS API provided by JBoss 6.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  JBoss6VFS.VFS
      A class that mimics a tiny subset of the JBoss VFS class.
      (package private) static class  JBoss6VFS.VirtualFile
      A class that mimics a tiny subset of the JBoss VirtualFile class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.concurrent.locks.ReentrantLock lock  
      private static Log log  
      private static java.lang.Boolean valid
      Flag that indicates if this VFS is valid for the current environment.
    • Constructor Summary

      Constructors 
      Constructor Description
      JBoss6VFS()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static <T> T checkNotNull​(T object)
      Verifies that the provided object reference is null.
      protected static void checkReturnType​(java.lang.reflect.Method method, java.lang.Class<?> expected)
      Verifies that the return type of method is what it is expected to be.
      protected static void initialize()
      Find all the classes and methods that are required to access the JBoss 6 VFS.
      boolean isValid()
      Return true if the VFS implementation is valid for the current environment.
      java.util.List<java.lang.String> list​(java.net.URL url, java.lang.String path)
      Recursively list the full resource path of all the resources that are children of the resource identified by a URL.
      protected static void setInvalid()
      Mark this JBoss6VFS.VFS as invalid for the current environment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static final Log log
      • lock

        private static final java.util.concurrent.locks.ReentrantLock lock
      • valid

        private static java.lang.Boolean valid
        Flag that indicates if this VFS is valid for the current environment.
    • Constructor Detail

      • JBoss6VFS

        public JBoss6VFS()
    • Method Detail

      • initialize

        protected static void initialize()
        Find all the classes and methods that are required to access the JBoss 6 VFS.
      • checkNotNull

        protected static <T> T checkNotNull​(T object)
        Verifies that the provided object reference is null. If it is null, then this VFS is marked as invalid for the current environment.
        Type Parameters:
        T - the generic type
        Parameters:
        object - The object reference to check for null.
        Returns:
        the t
      • checkReturnType

        protected static void checkReturnType​(java.lang.reflect.Method method,
                                              java.lang.Class<?> expected)
        Verifies that the return type of method is what it is expected to be. If it is not, then this VFS is marked as invalid for the current environment.
        Parameters:
        method - The method whose return type is to be checked.
        expected - A type to which the method's return type must be assignable.
        See Also:
        Class.isAssignableFrom(Class)
      • setInvalid

        protected static void setInvalid()
        Mark this JBoss6VFS.VFS as invalid for the current environment.
      • isValid

        public boolean isValid()
        Description copied from class: VFS
        Return true if the VFS implementation is valid for the current environment.
        Specified by:
        isValid in class VFS
        Returns:
        true, if is valid
      • list

        public java.util.List<java.lang.String> list​(java.net.URL url,
                                                     java.lang.String path)
                                              throws java.io.IOException
        Description copied from class: VFS
        Recursively list the full resource path of all the resources that are children of the resource identified by a URL.
        Specified by:
        list in class VFS
        Parameters:
        url - The URL that identifies the resource to list.
        path - The path to the resource that is identified by the URL. Generally, this is the value passed to VFS.getResources(String) to get the resource URL.
        Returns:
        A list containing the names of the child resources.
        Throws:
        java.io.IOException - If I/O errors occur