com.sun.javacard.ant.tasks
Class ConverterTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.Java
              extended bycom.sun.javacard.ant.tasks.JavacardTaskBase
                  extended bycom.sun.javacard.ant.tasks.ConverterTask

public class ConverterTask
extends JavacardTaskBase

Defines an ANT task to run the Java Card(TM) converter. See the http://java.sun.com/prodcuts.javacard for more informations. Wraps the call com.sun.javacard.converter.Converter in its own Ant task derived from the standard Java Task that comes with the Ant distribution.


Field Summary
protected  java.util.ArrayList applets
          List of applets in the package being converted
protected  org.apache.tools.ant.types.Path classDir
          base class directory
protected  java.io.File configfile
          configuration file
protected  boolean debug
          Flag to indicate if debug flag should be on or off
protected  boolean exportmap
          Indicates if exportmap option should be used
protected  org.apache.tools.ant.types.Path exportPath
          path to export files
protected  boolean intSupport
          Indicates if int support is required for the package being converted
protected  java.lang.String majorminorVersion
          package version number (combination of minor and major version numbers)
protected  boolean mask
          Indicates if this package is to be included in mask (rules on native methods are eased for this package)
protected  boolean noverify
          Indicates if verification is going to be performed after conversion or not
protected  boolean nowarn
          indicates if converter should output warning messages or not
protected  boolean outCAP
          Turns the output of CAP file on or off
protected  boolean outEXP
          Turns the output of EXP file on or off
protected  boolean outJCA
          Turns the output of JCA file on or off
protected  org.apache.tools.ant.types.Path outputDir
          output directory
protected  java.lang.String packageAID
          package AID
protected  java.lang.String packageName
          package name
protected  boolean verbose
          Indicates if verbose flag is on or off
 
Fields inherited from class com.sun.javacard.ant.tasks.JavacardTaskBase
bundleName, messages, noBanner, version
 
Fields inherited from class org.apache.tools.ant.taskdefs.Java
redirector, redirectorElement
 
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
ConverterTask()
           
 
Method Summary
 void addConfiguredAppletnameaid(AppletNameAID appletaid)
          Adds the applet names instance aids can be several
 org.apache.tools.ant.types.Path createExportpath()
          used to handle a nested path element for the export file path
 void execute()
          Builds the commandline of the converter and starts the converter.
 void setCap(boolean on)
          switches CAP file generation in the output
 void setClassdir(org.apache.tools.ant.types.Path classdir)
          set the path to the class directory of the package
 void setConfigfile(java.io.File config)
          Set the location of the config file, overrides all other settings
 void setDebug(boolean on)
          set the debug flag
 void setExp(boolean on)
          switches EXP file generation in the output
 void setExportmap(boolean on)
          set the exportmap flag
 void setExportpath(org.apache.tools.ant.types.Path exportPath)
          set path to the export files that should be used to generate the export file of the package
 void setExportpathRef(org.apache.tools.ant.types.Reference r)
          set a refernce to a path element for the export file path
 void setInt(boolean on)
          switches int support
 void setJca(boolean on)
          switches JCA file generation in the output
 void setMajorminorversion(java.lang.String majorMinor)
          set the major and minor version as one String
 void setMask(boolean on)
          switches maks generation
 void setNoverify(boolean on)
          switches the noverfier flag.
 void setNowarn(boolean on)
          switches the nowarn flag
 void setOutputdirectory(org.apache.tools.ant.types.Path dir)
          set the path to the output directory for the cap, exp and jca files
 void setPackageaid(java.lang.String packageAid)
          set the package AID of the package to be coverted
 void setPackageName(java.lang.String packageName)
          sets the package name
 void setVerbose(boolean on)
          switches the verbose flag
 
Methods inherited from class com.sun.javacard.ant.tasks.JavacardTaskBase
setNoBanner, setupCommonOptions, setVersion
 
Methods inherited from class org.apache.tools.ant.taskdefs.Java
addAssertions, addConfiguredRedirector, addEnv, addSysproperty, addSyspropertyset, clearArgs, createArg, createBootclasspath, createClasspath, createJvmarg, createPermissions, createWatchdog, executeJava, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, maybeSetResultPropertyValue, run, setAppend, setArgs, setClassname, setClasspath, setClasspathRef, setDir, setError, setErrorProperty, setFailonerror, setFork, setInput, setInputString, setJar, setJvm, setJvmargs, setJVMVersion, setLogError, setMaxmemory, setNewenvironment, setOutput, setOutputproperty, setResultProperty, setSpawn, setTimeout, setupRedirector
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, 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
 

Field Detail

packageName

protected java.lang.String packageName
package name


packageAID

protected java.lang.String packageAID
package AID


majorminorVersion

protected java.lang.String majorminorVersion
package version number (combination of minor and major version numbers)


applets

protected java.util.ArrayList applets
List of applets in the package being converted


classDir

protected org.apache.tools.ant.types.Path classDir
base class directory


outputDir

protected org.apache.tools.ant.types.Path outputDir
output directory


debug

protected boolean debug
Flag to indicate if debug flag should be on or off


exportmap

protected boolean exportmap
Indicates if exportmap option should be used


exportPath

protected org.apache.tools.ant.types.Path exportPath
path to export files


intSupport

protected boolean intSupport
Indicates if int support is required for the package being converted


mask

protected boolean mask
Indicates if this package is to be included in mask (rules on native methods are eased for this package)


noverify

protected boolean noverify
Indicates if verification is going to be performed after conversion or not


nowarn

protected boolean nowarn
indicates if converter should output warning messages or not


outCAP

protected boolean outCAP
Turns the output of CAP file on or off


outJCA

protected boolean outJCA
Turns the output of JCA file on or off


outEXP

protected boolean outEXP
Turns the output of EXP file on or off


verbose

protected boolean verbose
Indicates if verbose flag is on or off


configfile

protected java.io.File configfile
configuration file

Constructor Detail

ConverterTask

public ConverterTask()
Method Detail

setPackageName

public void setPackageName(java.lang.String packageName)
sets the package name

Parameters:
packageName - full qualified name of the package to convert

setPackageaid

public void setPackageaid(java.lang.String packageAid)
set the package AID of the package to be coverted

Parameters:
packageAid - AID of the package

setMajorminorversion

public void setMajorminorversion(java.lang.String majorMinor)
set the major and minor version as one String

Parameters:
majorMinor - version in the form e.g. 1.3

setClassdir

public void setClassdir(org.apache.tools.ant.types.Path classdir)
set the path to the class directory of the package

Parameters:
classdir - path to the class directory of the package

setOutputdirectory

public void setOutputdirectory(org.apache.tools.ant.types.Path dir)
set the path to the output directory for the cap, exp and jca files

Parameters:
dir - to the outpur directory

setDebug

public void setDebug(boolean on)
set the debug flag

Parameters:
on - switches the debug flag on or of

setExportmap

public void setExportmap(boolean on)
set the exportmap flag

Parameters:
on - switches the exportmap flag on or of

setExportpath

public void setExportpath(org.apache.tools.ant.types.Path exportPath)
set path to the export files that should be used to generate the export file of the package

Parameters:
exportPath - path to the export files

createExportpath

public org.apache.tools.ant.types.Path createExportpath()
used to handle a nested path element for the export file path


addConfiguredAppletnameaid

public void addConfiguredAppletnameaid(AppletNameAID appletaid)
Adds the applet names instance aids can be several

Parameters:
appletaid - combination of applet name and aid

setExportpathRef

public void setExportpathRef(org.apache.tools.ant.types.Reference r)
set a refernce to a path element for the export file path

Parameters:
r - a reference to the exportfiles path

setInt

public void setInt(boolean on)
switches int support

Parameters:
on - switches the integer flag on or off, default is off

setMask

public void setMask(boolean on)
switches maks generation

Parameters:
on - switches mask generation on or off, default is off

setNoverify

public void setNoverify(boolean on)
switches the noverfier flag.

Parameters:
on - switches the noverifier flag on or of, default is off meaning verification

setNowarn

public void setNowarn(boolean on)
switches the nowarn flag

Parameters:
on - switches the nowarn flag on or of, default is off meaning warnings are given

setCap

public void setCap(boolean on)
switches CAP file generation in the output

Parameters:
on - switches the *.cap file generation on of off, default is off, no cap file generation

setJca

public void setJca(boolean on)
switches JCA file generation in the output

Parameters:
on - switches the *.jca file generation on of off, default is off, no jca file generation

setExp

public void setExp(boolean on)
switches EXP file generation in the output

Parameters:
on - switches the *.exp file generation on of off, default is off, no exp file generation

setVerbose

public void setVerbose(boolean on)
switches the verbose flag

Parameters:
on - switches the verbose on of off, default is off, silent mode.

setConfigfile

public void setConfigfile(java.io.File config)
Set the location of the config file, overrides all other settings

Parameters:
config - the name and location of the config file

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Builds the commandline of the converter and starts the converter.

Throws:
org.apache.tools.ant.BuildException


Copyright © 2005 Sun Microsystems, Inc. 4150 Network Circle,
Santa Clara, CA-95054, U.S.A. All Rights Reserved.