peterreilly 2005/03/14 10:36:45
Modified: src/main/org/apache/tools/ant/taskdefs/rmic RmicAdapter.java
RmicAdapterFactory.java SunRmic.java WLRmic.java
Log:
stylecheck: mostly javadoc
Revision Changes Path
1.16 +5 -1
ant/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
Index: RmicAdapter.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- RmicAdapter.java 4 Aug 2004 22:03:46 -0000 1.15
+++ RmicAdapter.java 14 Mar 2005 18:36:44 -0000 1.16
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002,2004 The Apache Software Foundation
+ * Copyright 2001-2002,2004-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@
/**
* Sets the rmic attributes, which are stored in the Rmic task.
+ * @param attributes the rmic attributes to use
*/
void setRmic(Rmic attributes);
@@ -46,17 +47,20 @@
* Executes the task.
*
* @return has the compilation been successful
+ * @throws BuildException on error
*/
boolean execute() throws BuildException;
/**
* Maps source class files to the files generated by this rmic
* implementation.
+ * @return the filename mapper used by this implementation
*/
FileNameMapper getMapper();
/**
* The CLASSPATH this rmic process will use.
+ * @return the classpaht this rmic process will use
*/
Path getClasspath();
}
1.17 +8 -2
ant/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java
Index: RmicAdapterFactory.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- RmicAdapterFactory.java 22 Nov 2004 09:23:35 -0000 1.16
+++ RmicAdapterFactory.java 14 Mar 2005 18:36:44 -0000 1.17
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002,2004 The Apache Software Foundation
+ * Copyright 2001-2002,2004-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,9 +26,14 @@
*
* @since 1.4
*/
-public class RmicAdapterFactory {
+public final class RmicAdapterFactory {
+ /** The error message to be used when the compiler cannot be found. */
public static final String ERROR_UNKNOWN_COMPILER = "Cannot find the
compiler or class: ";
+
+ /** The error message to be used when the class is not an rmic adapter.
*/
public static final String ERROR_NOT_RMIC_ADAPTER = "Not an rmic
adapter: ";
+
+ /** If the compiler has this name use a default compiler. */
public static final String DEFAULT_COMPILER = "default";
/** This is a singleton -- can't create instances!! */
@@ -51,6 +56,7 @@
* @param rmicType either the name of the desired rmic, or the
* full classname of the rmic's adapter.
* @param task a task to log through.
+ * @return the compiler adapter
* @throws BuildException if the rmic type could not be resolved into
* a rmic adapter.
*/
1.18 +8 -1
ant/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
Index: SunRmic.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- SunRmic.java 22 Nov 2004 09:23:35 -0000 1.17
+++ SunRmic.java 14 Mar 2005 18:36:44 -0000 1.18
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2002,2004 The Apache Software Foundation
+ * Copyright 2001-2002,2004-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,12 +47,19 @@
* name of the executable
*/
public static final String RMIC_EXECUTABLE = "rmic";
+ /** Error message to use with the sun rmic is not the classpath. */
public static final String ERROR_NO_RMIC_ON_CLASSPATH = "Cannot use SUN
rmic, as it is not "
+ "available. A common solution is
to "
+ "set the environment variable "
+ "JAVA_HOME or CLASSPATH.";
+ /** Error message to use when there is an error starting the sun rmic
compiler */
public static final String ERROR_RMIC_FAILED = "Error starting SUN rmic:
";
+ /**
+ * Run the rmic compiler.
+ * @return true if the compilation succeeded
+ * @throws BuildException on error
+ */
public boolean execute() throws BuildException {
getRmic().log("Using SUN rmic compiler", Project.MSG_VERBOSE);
Commandline cmd = setupRmicCommand();
1.27 +19 -5
ant/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
Index: WLRmic.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- WLRmic.java 12 Nov 2004 15:15:22 -0000 1.26
+++ WLRmic.java 14 Mar 2005 18:36:44 -0000 1.27
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2004 The Apache Software Foundation
+ * Copyright 2001-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,20 +29,32 @@
* @since Ant 1.4
*/
public class WLRmic extends DefaultRmicAdapter {
+ /** The classname of the weblogic rmic */
public static final String WLRMIC_CLASSNAME = "weblogic.rmic";
/**
* the name of this adapter for users to select
*/
public static final String COMPILER_NAME = "weblogic";
- public static final String ERROR_NO_WLRMIC_ON_CLASSPATH = "Cannot use
WebLogic rmic, as it is not "
- + "available. A common solution is
to "
- + "set the environment variable "
- + "CLASSPATH.";
+ /** The error string to use if not able to find the weblogic rmic */
+ public static final String ERROR_NO_WLRMIC_ON_CLASSPATH =
+ "Cannot use WebLogic rmic, as it is not "
+ + "available. A common solution is to "
+ + "set the environment variable "
+ + "CLASSPATH.";
+
+ /** The error string to use if not able to start the weblogic rmic */
public static final String ERROR_WLRMIC_FAILED = "Error starting
WebLogic rmic: ";
+ /** The stub suffix */
public static final String WL_RMI_STUB_SUFFIX = "_WLStub";
+ /** The skeleton suffix */
public static final String WL_RMI_SKEL_SUFFIX = "_WLSkel";
+ /**
+ * Carry out the rmic compilation.
+ * @return true if the compilation succeeded
+ * @throws BuildException on error
+ */
public boolean execute() throws BuildException {
getRmic().log("Using WebLogic rmic", Project.MSG_VERBOSE);
Commandline cmd = setupRmicCommand(new String[] {"-noexit"});
@@ -80,6 +92,7 @@
/**
* Get the suffix for the rmic stub classes
+ * @return the stub suffix
*/
public String getStubClassSuffix() {
return WL_RMI_STUB_SUFFIX;
@@ -87,6 +100,7 @@
/**
* Get the suffix for the rmic skeleton classes
+ * @return the skeleton suffix
*/
public String getSkelClassSuffix() {
return WL_RMI_SKEL_SUFFIX;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]