You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2005/06/29 13:15:18 UTC
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Tstamp.java
peterreilly 2005/06/29 04:15:18
Modified: src/main/org/apache/tools/ant/taskdefs/email Message.java
src/main/org/apache/tools/ant/taskdefs/optional
TraXLiaison.java XalanLiaison.java
src/main/org/apache/tools/ant/taskdefs Tstamp.java
Log:
checkstyle javadoc
Revision Changes Path
1.15 +3 -1 ant/src/main/org/apache/tools/ant/taskdefs/email/Message.java
Index: Message.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/email/Message.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Message.java 9 Mar 2004 16:48:14 -0000 1.14
+++ Message.java 29 Jun 2005 11:15:18 -0000 1.15
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2004 The Apache Software Foundation
+ * Copyright 2002-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.
@@ -145,9 +145,11 @@
public boolean isMimeTypeSpecified() {
return specified;
}
+
/**
* Sets the character set of mail message.
* Will be ignored if mimeType contains ....; Charset=... substring.
+ * @param charset the character set name.
* @since Ant 1.6
*/
public void setCharset(String charset) {
1.36 +45 -3 ant/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
Index: TraXLiaison.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- TraXLiaison.java 9 Mar 2004 16:48:15 -0000 1.35
+++ TraXLiaison.java 29 Jun 2005 11:15:18 -0000 1.36
@@ -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.
@@ -101,9 +101,18 @@
/** factory attributes */
private Vector attributes = new Vector();
+ /**
+ * Constructor for TraXLiaison.
+ * @throws Exception never
+ */
public TraXLiaison() throws Exception {
}
+ /**
+ * Set the stylesheet file.
+ * @param stylesheet a <code>File</code> value
+ * @throws Exception on error
+ */
public void setStylesheet(File stylesheet) throws Exception {
if (this.stylesheet != null) {
// resetting the stylesheet - reset transformer
@@ -118,6 +127,12 @@
this.stylesheet = stylesheet;
}
+ /**
+ * Transform an input file.
+ * @param infile the file to transform
+ * @param outfile the result file
+ * @throws Exception on error
+ */
public void transform(File infile, File outfile) throws Exception {
if (transformer == null) {
createTransformer();
@@ -316,36 +331,61 @@
outputProperties.addElement(pair);
}
- /** Set the class to resolve entities during the transformation
+ /**
+ * Set the class to resolve entities during the transformation.
+ * @param aResolver the resolver class.
*/
public void setEntityResolver(EntityResolver aResolver) {
entityResolver = aResolver;
}
- /** Set the class to resolve URIs during the transformation
+ /**
+ * Set the class to resolve URIs during the transformation
+ * @param aResolver a <code>EntityResolver</code> value
*/
public void setURIResolver(URIResolver aResolver) {
uriResolver = aResolver;
}
+ /**
+ * Add a parameter.
+ * @param name the name of the parameter
+ * @param value the value of the parameter
+ */
public void addParam(String name, String value) {
final String[] pair = new String[]{name, value};
params.addElement(pair);
}
+ /**
+ * Set a logger.
+ * @param l a logger.
+ */
public void setLogger(XSLTLogger l) {
logger = l;
}
+ /**
+ * Log an error.
+ * @param e the exception to log.
+ */
public void error(TransformerException e) {
logError(e, "Error");
}
+ /**
+ * Log a fatal error.
+ * @param e the exception to log.
+ */
public void fatalError(TransformerException e) {
logError(e, "Fatal Error");
throw new BuildException("Fatal error during transformation", e);
}
+ /**
+ * Log a warning.
+ * @param e the exception to log.
+ */
public void warning(TransformerException e) {
logError(e, "Warning");
}
@@ -388,6 +428,8 @@
// kept for backwards compatibility
/**
+ * @param file the filename to use for the systemid
+ * @return the systemid
* @deprecated use org.apache.tools.ant.util.JAXPUtils#getSystemId instead
*/
protected String getSystemId(File file) {
1.22 +21 -1 ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
Index: XalanLiaison.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- XalanLiaison.java 9 Mar 2004 16:48:15 -0000 1.21
+++ XalanLiaison.java 29 Jun 2005 11:15:18 -0000 1.22
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002,2004 The Apache Software Foundation
+ * Copyright 2000-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.
@@ -37,14 +37,29 @@
protected XSLTProcessor processor;
protected File stylesheet;
+ /**
+ * Constructor for XalanLiaison.
+ * @throws Exception on error
+ */
public XalanLiaison() throws Exception {
processor = XSLTProcessorFactory.getProcessor();
}
+ /**
+ * Set the style sheet to use.
+ * @param stylesheet the style sheet file to use
+ * @throws Exception on error
+ */
public void setStylesheet(File stylesheet) throws Exception {
this.stylesheet = stylesheet;
}
+ /**
+ * Carry out the transformation.
+ * @param infile the input file
+ * @param outfile the output file
+ * @throws Exception on error
+ */
public void transform(File infile, File outfile) throws Exception {
FileInputStream fis = null;
FileOutputStream fos = null;
@@ -89,6 +104,11 @@
}
}
+ /**
+ * Add a parameter.
+ * @param name the name of the parameter
+ * @param value the value of the parameter
+ */
public void addParam(String name, String value) {
processor.setStylesheetParam(name, value);
}
1.42 +24 -12 ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
Index: Tstamp.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Tstamp.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- Tstamp.java 9 Mar 2004 16:48:06 -0000 1.41
+++ Tstamp.java 29 Jun 2005 11:15:18 -0000 1.42
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 The Apache Software Foundation
+ * Copyright 2000-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,7 +47,8 @@
/**
* Set a prefix for the properties. If the prefix does not end with a "."
- * one is automatically added
+ * one is automatically added.
+ * @param prefix the prefix to use.
* @since Ant 1.5
*/
public void setPrefix(String prefix) {
@@ -60,7 +61,7 @@
/**
* create the timestamps. Custom ones are done before
* the standard ones, to get their retaliation in early.
- * @throws BuildException
+ * @throws BuildException on error.
*/
public void execute() throws BuildException {
try {
@@ -132,7 +133,7 @@
/**
* The property to receive the date/time string in the given pattern
- * @param propertyName
+ * @param propertyName the name of the property.
*/
public void setProperty(String propertyName) {
this.propertyName = propertyName;
@@ -182,7 +183,7 @@
/**
* The timezone to use for displaying time.
* The values are as defined by the Java TimeZone class.
- * @param id
+ * @param id the timezone value.
* @see java.util.TimeZone
*/
public void setTimezone(String id) {
@@ -191,13 +192,15 @@
/**
* The numeric offset to the current time.
- * @param offset
+ * @param offset the offset to use.
*/
public void setOffset(int offset) {
this.offset = offset;
}
/**
+ * Set the unit type (using String).
+ * @param unit the unit to use.
* @deprecated setUnit(String) is deprecated and is replaced with
* setUnit(Tstamp.Unit) to make Ant's
* Introspection mechanism do the work and also to
@@ -226,16 +229,16 @@
* <li>year</li>
* </ul>
* The default unit is day.
- * @param unit
+ * @param unit the unit to use.
*/
public void setUnit(Unit unit) {
field = unit.getCalendarField();
}
/**
- * validate parameter and execute the format
- * @param project project to set property in
- * @param date date to use as a starting point
+ * validate parameter and execute the format.
+ * @param project project to set property in.
+ * @param date date to use as a starting point.
* @param location line in file (for errors)
*/
public void execute(Project project, Date date, Location location) {
@@ -287,7 +290,7 @@
private static final String MONTH = "month";
private static final String YEAR = "year";
- private static final String[] units = {
+ private static final String[] UNITS = {
MILLISECOND,
SECOND,
MINUTE,
@@ -300,6 +303,7 @@
private Hashtable calendarFields = new Hashtable();
+ /** Constructor for Unit enumerated type. */
public Unit() {
calendarFields.put(MILLISECOND,
new Integer(Calendar.MILLISECOND));
@@ -312,14 +316,22 @@
calendarFields.put(YEAR, new Integer(Calendar.YEAR));
}
+ /**
+ * Convert the value to int unit value.
+ * @return an int value.
+ */
public int getCalendarField() {
String key = getValue().toLowerCase();
Integer i = (Integer) calendarFields.get(key);
return i.intValue();
}
+ /**
+ * Get the valid values.
+ * @return the value values.
+ */
public String[] getValues() {
- return units;
+ return UNITS;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org