sun.module.repository
Class ExpandedJamDefinitionContent

java.lang.Object
  extended by java.module.ModuleDefinitionContent
      extended by sun.module.repository.ExpandedJamDefinitionContent

public class ExpandedJamDefinitionContent
extends ModuleDefinitionContent

/bin -- native libraries /lib -- embedded JARs /.module -- .module file /.jam -- original Jam file

Since:
1.7
Version:
1.19, 05/07/07
Author:
Stanley M. Ho, Andreas Sterbenz

Method Summary
 CodeSource getCodeSource()
          Returns the code source associated with the module definition.
 InputStream getEntryAsStream(String name)
          Returns an entry in the module definition as an input stream.
 List<String> getEntryNames()
          Returns the list of the names of the entries in the module definition.
 File getNativeLibrary(String libraryName)
          Returns the path of the native library associated with the module definition.
 boolean hasEntry(String name)
          Checks if an entry exists in the module definition.
static ModuleDefinition newInstance(Repository repository, File baseDirectory)
           
 
Methods inherited from class java.module.ModuleDefinitionContent
getEntryAsByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static ModuleDefinition newInstance(Repository repository,
                                           File baseDirectory)
                                    throws IOException
Throws:
IOException

getNativeLibrary

public File getNativeLibrary(String libraryName)
Description copied from class: ModuleDefinitionContent
Returns the path of the native library associated with the module definition.

Specified by:
getNativeLibrary in class ModuleDefinitionContent
Parameters:
libraryName - the library name.
Returns:
native library if found; otherwise, null is returned.

hasEntry

public boolean hasEntry(String name)
Description copied from class: ModuleDefinitionContent
Checks if an entry exists in the module definition.

The entry's name is specified as '/' separated paths, with no leading '/'.

Specified by:
hasEntry in class ModuleDefinitionContent
Parameters:
name - entry's name.
Returns:
true if entry exists in the module definition; otherwise, false is returned.

getEntryNames

public List<String> getEntryNames()
Description copied from class: ModuleDefinitionContent
Returns the list of the names of the entries in the module definition.

Each entry's name is in the form of '/' separated paths, with no leading '/'.

Specified by:
getEntryNames in class ModuleDefinitionContent
Returns:
the list of the names of the entries in the module definition.

getEntryAsStream

public InputStream getEntryAsStream(String name)
                             throws IOException
Description copied from class: ModuleDefinitionContent
Returns an entry in the module definition as an input stream.

The entry's name is specified as '/' separated paths, with no leading '/'.

Specified by:
getEntryAsStream in class ModuleDefinitionContent
Parameters:
name - entry's name.
Returns:
if entry exists, return input stream; otherwise, return null.
Throws:
IOException - if an I/O error occurs.

getCodeSource

public CodeSource getCodeSource()
Description copied from class: ModuleDefinitionContent
Returns the code source associated with the module definition.

Specified by:
getCodeSource in class ModuleDefinitionContent
Returns:
code source of the module definition.