org.apache.commons.classscan.builtin
Class JarClassPathElement

java.lang.Object
  extended by org.apache.commons.classscan.builtin.JarClassPathElement
All Implemented Interfaces:
Iterable<ClassFile>, ClassPathElement, SpiClassPathElement

public class JarClassPathElement
extends Object
implements SpiClassPathElement


Constructor Summary
JarClassPathElement(URL location)
           
 
Method Summary
 Collection<SpiClassPathElement> getAdditionalLocations(SpiMetaRegistry registry)
          Obtain any additional ClassPath elements specified within the metadata of this element.
 String getLocation()
          Get the location of the class bytes.
 ResourceFile getResource(String fileName)
          Get a file with a particular name
 Iterator<ClassFile> iterator()
          Get a Iterator over the files specified by this instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarClassPathElement

public JarClassPathElement(URL location)
Method Detail

iterator

public Iterator<ClassFile> iterator()
Description copied from interface: ClassPathElement
Get a Iterator over the files specified by this instance

Specified by:
iterator in interface Iterable<ClassFile>
Specified by:
iterator in interface ClassPathElement

getLocation

public String getLocation()
Description copied from interface: ClassPathElement
Get the location of the class bytes. This value is intended to be used as an argument to the URL constructor.

Specified by:
getLocation in interface ClassPathElement

getAdditionalLocations

public Collection<SpiClassPathElement> getAdditionalLocations(SpiMetaRegistry registry)
Description copied from interface: SpiClassPathElement
Obtain any additional ClassPath elements specified within the metadata of this element. e.g. The elements specified by the Class-Path attribute of a jar manifest

Specified by:
getAdditionalLocations in interface SpiClassPathElement
Returns:
null, or an iterator over additional path elements

getResource

public ResourceFile getResource(String fileName)
Description copied from interface: ClassPathElement
Get a file with a particular name

Specified by:
getResource in interface ClassPathElement
Parameters:
fileName - The name of the desired file (this may be a path such as META-INF/resources/com.example.group.interface)
Returns:
null, if not found; otherwise the ResourceFile


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.