JavahAdapterFactory (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.javah, class: JavahAdapterFactory

Package org.apache.tools.ant.taskdefs.optional.javah

# Class JavahAdapterFactory

java.lang.Object
org.apache.tools.ant.taskdefs.optional.javah.JavahAdapterFactory

public class JavahAdapterFactory extends Object
Creates the JavahAdapter based on the user choice and potentially the VM vendor.

Since:
  Ant 1.6.3

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JavahAdapterFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static JavahAdapter`
  `getAdapter​(String choice, ProjectComponent log)`
  Creates the JavahAdapter based on the user choice and potentially the VM vendor.
  `static JavahAdapter`
  `getAdapter​(String choice, ProjectComponent log, Path classpath)`
  Creates the JavahAdapter based on the user choice and potentially the VM vendor.
  `static String`
  `getDefault()`
  Determines the default choice of adapter based on the VM vendor.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JavahAdapterFactory

    public JavahAdapterFactory()

- ## Method Details

  - ### getDefault

    public static String getDefault()
    Determines the default choice of adapter based on the VM vendor.
    Returns:
      the default choice of adapter based on the VM vendor

  - ### getAdapter

    public static JavahAdapter getAdapter​(String choice, ProjectComponent log) throws BuildException
    Creates the JavahAdapter based on the user choice and potentially the VM vendor.
    Parameters:
      `choice` - the user choice (if any).
      `log` - a ProjectComponent instance used to access Ant's logging system.
    Returns:
      The adapter to use.
    Throws:
      `BuildException` - if there is an error.

  - ### getAdapter

    public static JavahAdapter getAdapter​(String choice, ProjectComponent log, Path classpath) throws BuildException
    Creates the JavahAdapter based on the user choice and potentially the VM vendor.
    Parameters:
      `choice` - the user choice (if any).
      `log` - a ProjectComponent instance used to access Ant's logging system.
      `classpath` - the classpath to use when looking up an adapter class
    Returns:
      The adapter to use.
    Throws:
      `BuildException` - if there is an error.
    Since:
      Ant 1.8.0