com.ibm.dtfj.image

Interface ImageFactory


  1. public interface ImageFactory

This interface is used for classes which can produce instances of Image implementors.

Classes that implement this interface should provide a zero argument, public constructor so that they can be created using newInstance().

e.g.
 Image image;
 try {
   Class factoryClass = Class.forName("com.ibm.dtfj.image.j9.ImageFactory");
         ImageFactory factory = (ImageFactory) factoryClass.newInstance();
         image = factory.getImage(new File(coreFileName), new File(xmlFileName));
 } catch (ClassNotFoundException e) {
         System.err.println("Could not find DTFJ factory class:");
         e.printStackTrace(System.err);
 } catch (IllegalAccessException e) {
         System.err.println("Could not instantiate DTFJ factory class:");
         e.printStackTrace(System.err);
 } catch (InstantiationException e) {
         System.err.println("Could not instantiate DTFJ factory class:");
         e.printStackTrace(System.err);
 } catch (IOException e) {
         System.err.println("Could not find file required for bootstrapping:");
         e.printStackTrace(System.err);
 }
 

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
DTFJ_LOGGER_NAME
This is the name of the java.util.logging.Logger subsystem to which DTFJ passes verbose messages.
  1. static
  2. int
DTFJ_MAJOR_VERSION
The major version number of the current API.
  1. static
  2. int
DTFJ_MINOR_VERSION
The minor version number of the current API Note that this value will be inlined so users can reference it directly (ie: factory.getDTFJMinorVersion() >= ImageFactory.DTFJ_MINOR_VERSION)

Method Summary

Modifier and Type Method and Description
  1. int
getDTFJMajorVersion()
Fetch the DTFJ major version number.
  1. int
getDTFJMinorVersion()
Fetch the DTFJ minor version number.
  1. int
getDTFJModificationLevel()
Fetch the DTFJ modification level.
  1. Image
getImage(java.io.File imageFile)
Creates a new Image object based on the contents of imageFile.
  1. Image
getImage(java.io.File imageFile,java.io.File metadata)
Creates a new Image object based on the contents of imageFile and metadata.

Field Detail

DTFJ_MAJOR_VERSION

  1. static final int DTFJ_MAJOR_VERSION
The major version number of the current API. Note that this value will be inlined so users can reference it directly (ie: factory.getDTFJMajorVersion() >= ImageFactory.DTFJ_MAJOR_VERSION)
See Also:

DTFJ_MINOR_VERSION

  1. static final int DTFJ_MINOR_VERSION
The minor version number of the current API Note that this value will be inlined so users can reference it directly (ie: factory.getDTFJMinorVersion() >= ImageFactory.DTFJ_MINOR_VERSION)
See Also:

DTFJ_LOGGER_NAME

  1. static final java.lang.String DTFJ_LOGGER_NAME
This is the name of the java.util.logging.Logger subsystem to which DTFJ passes verbose messages.
See Also:

Method Detail

getImage

  1. Image getImage(java.io.File imageFile)
  2. throws java.io.IOException
Creates a new Image object based on the contents of imageFile.
Parameters:
imageFile - a file with Image information, typically a core file.
Returns:
an instance of Image
Throws:
java.io.IOException

getImage

  1. Image getImage(java.io.File imageFile,
  2. java.io.File metadata)
  3. throws java.io.IOException
Creates a new Image object based on the contents of imageFile and metadata.
Parameters:
imageFile - a file with Image information, typically a core file.
metadata - a file with additional Image information. This is an implementation defined file.
Returns:
an instance of Image.
Throws:
java.io.IOException

getDTFJMajorVersion

  1. int getDTFJMajorVersion()
Fetch the DTFJ major version number.
Returns:
An integer corresponding to the DTFJ API major version number.

getDTFJMinorVersion

  1. int getDTFJMinorVersion()
Fetch the DTFJ minor version number.
Returns:
An integer corresponding to the DTFJ API minor version number.

getDTFJModificationLevel

  1. int getDTFJModificationLevel()
Fetch the DTFJ modification level.
Returns:
An integer corresponding to the DTFJ API modification level.
Since:
SDK 6.0 SR1 (DTFJ version 1.2)