Top Description Constructors Methods
org.apache.tools.ant.taskdefs.optional.javah

public Class JavahAdapterFactory

extends Object
Class Inheritance
Imports
org.apache.tools.ant.BuildException, .ProjectComponent, org.apache.tools.ant.types.Path, org.apache.tools.ant.util.ClasspathUtils, .JavaEnvUtils

Creates the JavahAdapter based on the user choice and potentially the VM vendor.
Since
Ant 1.6.3

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static JavahAdapter

Returns:

The adapter to use.
getAdapter
(String
the user choice (if any).
choice
,
ProjectComponent
a ProjectComponent instance used to access Ant's logging system.
log
)

Creates the JavahAdapter based on the user choice and potentially the VM vendor.

public static JavahAdapter

Returns:

The adapter to use.
getAdapter
(String
the user choice (if any).
choice
,
ProjectComponent
a ProjectComponent instance used to access Ant's logging system.
log
,
Path
the classpath to use when looking up an adapter class
classpath
)

Creates the JavahAdapter based on the user choice and potentially the VM vendor.

public static String

Returns:

the default choice of adapter based on the VM vendor
getDefault
()

Determines the default choice of adapter based on the VM vendor.

private static JavahAdapter
resolveClassName(String
The fully qualified classname to be created.
className
,
ClassLoader
the classloader to use
loader
)

Tries to resolve the given classname into a javah adapter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JavahAdapterFactoryback to summary
public JavahAdapterFactory()

Method Detail

getAdapterback to summary
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:String

the user choice (if any).

log:ProjectComponent

a ProjectComponent instance used to access Ant's logging system.

Returns:JavahAdapter

The adapter to use.

Exceptions
BuildException:
if there is an error.
getAdapterback to summary
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:String

the user choice (if any).

log:ProjectComponent

a ProjectComponent instance used to access Ant's logging system.

classpath:Path

the classpath to use when looking up an adapter class

Returns:JavahAdapter

The adapter to use.

Exceptions
BuildException:
if there is an error.
Since
Ant 1.8.0
getDefaultback to summary
public static String getDefault()

Determines the default choice of adapter based on the VM vendor.

Returns:String

the default choice of adapter based on the VM vendor

resolveClassNameback to summary
private static JavahAdapter resolveClassName(String className, ClassLoader loader) throws BuildException

Tries to resolve the given classname into a javah adapter. Throws a fit if it can't.

Parameters
className:String

The fully qualified classname to be created.

loader:ClassLoader

the classloader to use

Exceptions
BuildException:
This is the fit that is thrown if className isn't an instance of JavahAdapter.