Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
org.apache.tools.ant.taskdefs.Rmic
public class Rmic
extends MatchingTask
Outer$$Inner
instead of
Outer.Inner
.
It is possible to refine the set of files that are being rmiced. This can
be done with the includes, includesfile, excludes,
excludesfile and defaultexcludes
attributes. With the includes or includesfile attribute you
specify the files you want to have included by using patterns. The
exclude or excludesfile attribute is used to specify
the files you want to have excluded. This is also done with patterns. And
finally with the defaultexcludes attribute, you can specify whether
you want to use default exclusions or not. See the section on
directory based tasks, on how the
inclusion/exclusion of files works, and how to write patterns.
This task forms an implicit FileSet and
supports all attributes of <fileset>
(dir
becomes base
) as well as the nested
<include>
, <exclude>
and
<patternset>
elements.
It is possible to use different compilers. This can be selected
with the "build.rmic" property or the compiler
attribute. There are three choices:
Kaffe
)Nested Class Summary | |
class |
|
Field Summary |
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask | |
fileset |
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 | |
|
Method Summary | |
Path |
|
Rmic.ImplementationSpecificArgument |
|
Path |
|
void |
|
File |
|
String |
|
Path |
|
Vector | |
String |
|
String[] |
|
boolean |
|
Path |
|
Vector |
|
boolean |
|
boolean |
|
String |
|
boolean |
|
String |
|
boolean |
|
boolean |
|
ClassLoader |
|
Class |
|
File |
|
String |
|
boolean |
|
boolean |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask | |
XsetIgnore , XsetItems , add , addAnd , addContains , addContainsRegexp , addCustom , addDate , addDepend , addDepth , addDifferent , addFilename , addMajority , addModified , addNone , addNot , addOr , addPresent , addSelector , addSize , addType , appendSelector , createExclude , createExcludesFile , createInclude , createIncludesFile , createPatternSet , getDirectoryScanner , getImplicitFileSet , getSelectors , hasSelectors , selectorCount , selectorElements , setCaseSensitive , setDefaultexcludes , setExcludes , setExcludesfile , setFollowSymlinks , setIncludes , setIncludesfile , setProject |
Methods inherited from class org.apache.tools.ant.Task | |
execute , 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 , log , log , setProject |
public Rmic.ImplementationSpecificArgument createCompilerArg()
Adds an implementation specific command line argument.
- Returns:
- an object to be configured with a command line argument
- Since:
- Ant 1.5
public Path createExtdirs()
Maybe creates a nested extdirs element.
- Returns:
- path object to be configured with the extension directories
public void execute() throws BuildException
execute by creating an instance of an implementation class and getting to do the work
public File getBase()
Gets the base directory to output generated class.
- Returns:
- the location of the compiled files
public String getClassname()
Gets the class name to compile.
- Returns:
- the name of the class to compile
public Vector getCompileList()
- Returns:
- the compile list.
public String getCompiler()
get the name of the current compiler
- Returns:
- the name of the compiler
- Since:
- Ant 1.5
public String[] getCurrentCompilerArgs()
Get the additional implementation specific command line arguments.
- Returns:
- array of command line arguments, guaranteed to be non-null.
- Since:
- Ant 1.5
public boolean getDebug()
Gets the debug flag.
- Returns:
- debug
public Path getExtdirs()
Gets the extension directories that will be used during the compilation.
- Returns:
- the extension directories to be used
public Vector getFileList()
Gets file list to compile.
- Returns:
- the list of files to compile.
public boolean getFiltering()
Gets whether token filtering is set
- Returns:
- filtering
public boolean getIdl()
Gets IDL flags.
- Returns:
- the idl flag
public String getIdlopts()
Gets additional arguments for idl compile.
- Returns:
- the idl options
public boolean getIiop()
Gets iiop flags.
- Returns:
- iiop
public String getIiopopts()
Gets additional arguments for iiop.
- Returns:
- iiopOpts
public boolean getIncludeantruntime()
Gets whether or not the ant classpath is to be included in the task's classpath.
- Returns:
- true if ant's classpath is to be included
public boolean getIncludejavaruntime()
Gets whether or not the java runtime should be included in this task's classpath.
- Returns:
- true if default run-time libraries are included
public ClassLoader getLoader()
Classloader for the user-specified classpath.
- Returns:
- the classloader
public Class getRemoteInterface(Class testClass)
Returns the topmost interface that extends Remote for a given class - if one exists.
- Parameters:
testClass
- the class to be tested
- Returns:
- the topmost interface that extends Remote, or null if there is none.
public File getSourceBase()
Gets the source dirs to find the source java files.
- Returns:
- sourceBase the directory containing the source files.
public String getStubVersion()
Gets the JDK version for the generated stub code.
- Returns:
- stubVersion
public boolean getVerify()
Get verify flag.
- Returns:
- verify
public boolean isValidRmiRemote(String classname)
Load named class and test whether it can be rmic'ed
- Parameters:
classname
- the name of the class to be tested
- Returns:
- true if the class can be rmic'ed
protected void scanDir(File baseDir, String[] files, FileNameMapper mapper)
Scans the directory looking for class files to be compiled. The result is returned in the class variable compileList.
- Parameters:
baseDir
- the base directionfiles
- the list of files to scanmapper
- the mapper of files to target files
public void setBase(File base)
Sets the location to store the compiled files; required
- Parameters:
base
- the location to store the compiled files
public void setClassname(String classname)
Sets the class to runrmic
against; optional
- Parameters:
classname
- the name of the class for rmic to create code for
public void setClasspath(Path classpath)
Set the classpath to be used for this compilation.
- Parameters:
classpath
- the classpath used for this compilation
public void setClasspathRef(Reference pathRef)
Adds to the classpath a reference to a <path> defined elsewhere.
- Parameters:
pathRef
- the reference to add to the classpath
public void setCompiler(String compiler)
Sets the compiler implementation to use; optional, defaults to the value of thebuild.rmic
property, or failing that, default compiler for the current VM
- Parameters:
compiler
- the compiler implemention to use
- Since:
- Ant 1.5
public void setDebug(boolean debug)
Generate debug info (passes -g to rmic); optional, defaults to false
- Parameters:
debug
- turn on debug info
public void setExtdirs(Path extDirs)
Sets the extension directories that will be used during the compilation; optional.
- Parameters:
extDirs
- the extension directories to be used
public void setFiltering(boolean filter)
Sets token filtering [optional], default=false
- Parameters:
filter
- turn on token filtering
public void setIdl(boolean idl)
Indicates that IDL output should be generated. This defaults to false if not set.
- Parameters:
idl
- generate IDL output
public void setIdlopts(String idlOpts)
pass additional arguments for IDL compile
- Parameters:
idlOpts
- additional IDL arguments
public void setIiop(boolean iiop)
Indicates that IIOP compatible stubs should be generated; optional, defaults to false if not set.
- Parameters:
iiop
- generate IIOP compatible stubs
public void setIiopopts(String iiopOpts)
Set additional arguments for iiop
- Parameters:
iiopOpts
- additional arguments for iiop
public void setIncludeantruntime(boolean include)
Sets whether or not to include ant's own classpath in this task's classpath. Optional; default istrue
.
- Parameters:
include
- if true include ant's classpath
public void setIncludejavaruntime(boolean include)
task's classpath. Enables or disables including the default run-time libraries from the executing VM; optional, defaults to false
- Parameters:
include
- if true include default run-time libraries
public void setSourceBase(File sourceBase)
optional directory to save generated source files to.
- Parameters:
sourceBase
- the directory to save source files to.
public void setStubVersion(String stubVersion)
Specify the JDK version for the generated stub code. Specify "1.1" to pass the "-v1.1" option to rmic.
- Parameters:
stubVersion
- the JDK version
public void setVerify(boolean verify)
Flag to enable verification so that the classes found by the directory match are checked to see if they implement java.rmi.Remote. optional; This defaults to false if not set.
- Parameters:
verify
- turn on verification for classes