Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.ui.jarpackager
Interface IJarBuilder


public interface IJarBuilder

A JAR builder can be used to add elements to a JAR file which is about to be build.

The protocol defined by this interface is:

  • open is called
  • addFile and addJar is called multiple times
  • close is called
It is guaranteed that addFile and addJar is only called after open is called and before close is called. Other methods may be called any time.

Implementors must be prepared that an instance if the implementation is reused multiple times.

In order to provide backward compatibility for clients of IJarBuilder, extension interfaces are used to provide a means of evolution. The following extension interfaces exist:

  • IJarBuilderExtension since version 3.5 introducing the following functions:
    • Write a file to the JAR to build
  • Since:
    3.4
    See Also:
    JarPackageData

    Method Summary
     void close ()
              Called when building of the JAR finished.
      String getId ()
              Returns the unique id of this builder
      IManifestProvider getManifestProvider ()
              Returns the manifest provider to build the manifest
     void open ( JarPackageData jarPackage, Shell shell, MultiStatus status)
              Called when building of the JAR starts
     void writeArchive ( ZipFile archive, IProgressMonitor monitor)
              Add the given archive to the archive which is about to be build
     void writeFile ( IFile resource, IPath destinationPath)
              Add the given resource to the archive at the given path
     

    Method Detail

    getId

    
    String getId()
    Returns the unique id of this builder

    Returns:
    the unique id of this builder

    getManifestProvider

    
    IManifestProvider getManifestProvider()
    Returns the manifest provider to build the manifest

    Returns:
    the manifest provider to build the manifest

    open

    void open(
    JarPackageData jarPackage,
              
    Shell shell,
              
    MultiStatus status)
              throws 
    CoreException
    
    Called when building of the JAR starts

    Parameters:
    jarPackage - the package to build
    shell - shell to show dialogs, null if no dialog must be shown
    status - a status to use to report status to the user
    Throws:
    CoreException - thrown when the JAR could not be opened

    writeFile

    void writeFile(
    IFile resource,
                   
    IPath destinationPath)
                   throws 
    CoreException
    
    Add the given resource to the archive at the given path

    Parameters:
    resource - the file to be written
    destinationPath - the path for the file inside the archive
    Throws:
    CoreException - thrown when the file could not be written

    writeArchive

    void writeArchive(
    ZipFile archive,
                      
    IProgressMonitor monitor)
    Add the given archive to the archive which is about to be build

    Parameters:
    archive - the archive to add
    monitor - a monitor to report progress to

    close

    void close()
               throws 
    CoreException
    
    Called when building of the JAR finished.

    Throws:
    CoreException - thrown when the JAR could not be closed

    Eclipse JDT
    Release 3.5

    Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire