Class ByteArrayClassLoader.ChildFirst.PrependingEnumeration

  • All Implemented Interfaces:
    java.util.Enumeration<java.net.URL>
    Enclosing class:
    ByteArrayClassLoader.ChildFirst

    protected static class ByteArrayClassLoader.ChildFirst.PrependingEnumeration
    extends java.lang.Object
    implements java.util.Enumeration<java.net.URL>
    An enumeration that prepends an element to another enumeration and skips the last element of the provided enumeration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Enumeration<java.net.URL> enumeration
      The enumeration from which the next elements should be pulled.
      private java.net.URL nextElement
      The next element to return from this enumeration or null if such an element does not exist.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PrependingEnumeration​(java.net.URL url, java.util.Enumeration<java.net.URL> enumeration)
      Creates a new prepending enumeration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasMoreElements()
      java.net.URL nextElement()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Enumeration

        asIterator
    • Field Detail

      • nextElement

        private java.net.URL nextElement
        The next element to return from this enumeration or null if such an element does not exist.
      • enumeration

        private final java.util.Enumeration<java.net.URL> enumeration
        The enumeration from which the next elements should be pulled.
    • Constructor Detail

      • PrependingEnumeration

        protected PrependingEnumeration​(java.net.URL url,
                                        java.util.Enumeration<java.net.URL> enumeration)
        Creates a new prepending enumeration.
        Parameters:
        url - The first element of the enumeration.
        enumeration - An enumeration that is used for pulling subsequent urls.
    • Method Detail

      • hasMoreElements

        public boolean hasMoreElements()
        Specified by:
        hasMoreElements in interface java.util.Enumeration<java.net.URL>
      • nextElement

        public java.net.URL nextElement()
        Specified by:
        nextElement in interface java.util.Enumeration<java.net.URL>