org.apache.tools.ant.taskdefs.optional.dotnet
Class ImportTypelib

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.dotnet.ImportTypelib

public class ImportTypelib
extends Task

Import a COM type library into the .NET framework.

This task is a wrapper to .NET's tlbimport; it imports a tlb file to a NET assembly by generating a binary assembly (.dll) that contains all the binding metadata. It uses date timestamps to minimise rebuilds.

Example

     <importtypelib
       srcfile="xerces.tlb"
       destfile="xerces.dll"
       namespace="Apache.Xerces"/>
 

Since:
Ant 1.6

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ImportTypelib()
           
 
Method Summary
 void execute()
          Create a typelib command
 void setDestFile(java.io.File destFile)
          This method names the output file.
 void setExtraOptions(java.lang.String extraOptions)
          set any extra options that are not yet supported by this task.
 void setNamespace(java.lang.String namespace)
          This method sets what namespace the typelib is to be in.
 void setSrcFile(java.io.File srcFile)
          This method sets which is the source .tlb file.
 void setUnsafe(boolean unsafe)
          do you want unsafe code.
 void setUseSysArray(boolean useSysArray)
          set this to map a COM SafeArray to the System.Array class
protected  void validate()
          validation code
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportTypelib

public ImportTypelib()
Method Detail

setDestFile

public void setDestFile(java.io.File destFile)
This method names the output file. This is an operation which is required to have been performed.

Parameters:
destFile -

setNamespace

public void setNamespace(java.lang.String namespace)
This method sets what namespace the typelib is to be in. This is an operation which is required to have been performed.

Parameters:
namespace -

setSrcFile

public void setSrcFile(java.io.File srcFile)
This method sets which is the source .tlb file. This is an operation which is required to have been performed.

Parameters:
srcFile -

setUnsafe

public void setUnsafe(boolean unsafe)
do you want unsafe code.

Parameters:
unsafe -

setUseSysArray

public void setUseSysArray(boolean useSysArray)
set this to map a COM SafeArray to the System.Array class

Parameters:
useSysArray -

setExtraOptions

public void setExtraOptions(java.lang.String extraOptions)
set any extra options that are not yet supported by this task.

Parameters:
extraOptions -

validate

protected void validate()
                 throws BuildException
validation code

Throws:
BuildException - if validation failed

execute

public void execute()
             throws BuildException
Create a typelib command

Overrides:
execute in class Task
Throws:
BuildException - if something goes wrong with the build


Copyright 2000-2005 Apache Software Foundation. All Rights Reserved.