- added javadoc
- minor tweaks
Index: DefaultRmicAdapter.java
===================================================================
RCS file:
/home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java,v
retrieving revision 1.34
diff -u -r1.34 DefaultRmicAdapter.java
--- DefaultRmicAdapter.java 8 Oct 2004 11:09:46 -0000 1.34
+++ DefaultRmicAdapter.java 13 Dec 2004 03:58:32 -0000
@@ -37,31 +37,54 @@
private Rmic attributes;
private FileNameMapper mapper;
- private static final Random rand = new Random();
+ private static final Random RAND = new Random();
public static final String RMI_STUB_SUFFIX = "_Stub";
public static final String RMI_SKEL_SUFFIX = "_Skel";
public static final String RMI_TIE_SUFFIX = "_Tie";
+ /**
+ * Default constructor
+ */
public DefaultRmicAdapter() {
}
- public void setRmic(Rmic attributes) {
+ /**
+ * Sets Rmic attributes
+ * @param attributes
+ */
+ public void setRmic(final Rmic attributes) {
this.attributes = attributes;
mapper = new RmicFileNameMapper();
}
+ /**
+ * Get the Rmic attributes
+ * @return the attributes as a Rmic taskdef
+ */
public Rmic getRmic() {
return attributes;
}
+ /**
+ * Gets the stub class suffix
+ * @return the stub suffix "_Stub"
+ */
protected String getStubClassSuffix() {
return RMI_STUB_SUFFIX;
}
+ /**
+ * Gets the skeleton class suffix
+ * @return the skeleton suffix "_Skel"
+ */
protected String getSkelClassSuffix() {
return RMI_SKEL_SUFFIX;
}
+ /**
+ * Gets the tie class suffix
+ * @return the tie suffix "_Tie"
+ */
protected String getTieClassSuffix() {
return RMI_TIE_SUFFIX;
}
@@ -81,13 +104,15 @@
* interfaces and _*_getStubClassSuffix for non-interfaces (and
* determine the interface and create _*_Stub from that).</li>
* </ul>
+ * @return a <code>FileNameMapper</code>
*/
public FileNameMapper getMapper() {
return mapper;
}
/**
- * The CLASSPATH this rmic process will use.
+ * Gets the CLASSPATH this rmic process will use.
+ * @return the classpath
*/
public Path getClasspath() {
return getCompileClasspath();
@@ -95,6 +120,7 @@
/**
* Builds the compilation classpath.
+ * @return the classpath
*/
protected Path getCompileClasspath() {
Path classpath = new Path(attributes.getProject());
@@ -122,15 +148,14 @@
}
/**
- * setup rmic argument for rmic.
+ * Setup rmic argument for rmic.
*/
protected Commandline setupRmicCommand() {
return setupRmicCommand(null);
}
/**
- * setup rmic argument for rmic.
- *
+ * Setup rmic argument for rmic.
* @param options additional parameters needed by a specific
* implementation.
*/
@@ -204,6 +229,7 @@
/**
* Logs the compilation parameters, adds the files to compile and logs the
* "niceSourceList"
+ * @param cmd the commandline args
*/
protected void logAndAddFilesToCompile(Commandline cmd) {
Vector compileList = attributes.getCompileList();
@@ -212,12 +238,13 @@
Project.MSG_VERBOSE);
StringBuffer niceSourceList = new StringBuffer("File");
- if (compileList.size() != 1) {
+ int cListSize = compileList.size();
+ if (cListSize != 1) {
niceSourceList.append("s");
}
niceSourceList.append(" to be compiled:");
- for (int i = 0; i < compileList.size(); i++) {
+ for (int i = 0; i < cListSize; i++) {
String arg = (String) compileList.elementAt(i);
cmd.createArgument().setValue(arg);
niceSourceList.append(" " + arg);
@@ -284,7 +311,7 @@
* This is supposed to make Ant always recompile the
* class, as a file of that name should not exist.
*/
- String[] target = new String[] {name + ".tmp." + rand.nextLong()};
+ String[] target = new String[] {name + ".tmp." + RAND.nextLong()};
if (!attributes.getIiop() && !attributes.getIdl()) {
// JRMP with simple naming convention
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]