git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@471289 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -283,7 +283,7 @@ public class AntTypeDefinition { | |||||
| * Inner implementation of the {@link #createAndSet(Project, Class)} logic, with no | * Inner implementation of the {@link #createAndSet(Project, Class)} logic, with no | ||||
| * exception catching | * exception catching | ||||
| * @param newclass class to create | * @param newclass class to create | ||||
| * @param project | |||||
| * @param project the project to use | |||||
| * @return a newly constructed and bound instance. | * @return a newly constructed and bound instance. | ||||
| * @throws NoSuchMethodException no good construtor. | * @throws NoSuchMethodException no good construtor. | ||||
| * @throws InstantiationException cannot initialize the object. | * @throws InstantiationException cannot initialize the object. | ||||
| @@ -502,7 +502,7 @@ public class ComponentHelper { | |||||
| if (c == null || !(Task.class.isAssignableFrom(c))) { | if (c == null || !(Task.class.isAssignableFrom(c))) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| Object obj= createComponent(taskType); | |||||
| Object obj = createComponent(taskType); | |||||
| if (obj == null) { | if (obj == null) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| @@ -864,7 +864,7 @@ public class DirectoryScanner | |||||
| } | } | ||||
| } | } | ||||
| while (it.hasNext()) { | while (it.hasNext()) { | ||||
| Map.Entry entry = (Map.Entry)it.next(); | |||||
| Map.Entry entry = (Map.Entry) it.next(); | |||||
| String currentelement = (String) entry.getKey(); | String currentelement = (String) entry.getKey(); | ||||
| if (basedir == null && !FileUtils.isAbsolutePath(currentelement)) { | if (basedir == null && !FileUtils.isAbsolutePath(currentelement)) { | ||||
| continue; | continue; | ||||
| @@ -2282,6 +2282,7 @@ public class Project implements ResourceFactory { | |||||
| * Resolve the file relative to the project's basedir and return it as a | * Resolve the file relative to the project's basedir and return it as a | ||||
| * FileResource. | * FileResource. | ||||
| * @param name the name of the file to resolve. | * @param name the name of the file to resolve. | ||||
| * @return the file resource. | |||||
| * @since Ant 1.7 | * @since Ant 1.7 | ||||
| */ | */ | ||||
| public Resource getResource(String name) { | public Resource getResource(String name) { | ||||
| @@ -37,7 +37,7 @@ public abstract class ProjectComponent implements Cloneable { | |||||
| /** | /** | ||||
| * Location within the build file of this task definition. | * Location within the build file of this task definition. | ||||
| * @deprecated since 1.6.x. | |||||
| * @deprecated since 1.6.x. | |||||
| * You should not be accessing this variable directly. | * You should not be accessing this variable directly. | ||||
| * Please use the {@link #getLocation()} method. | * Please use the {@link #getLocation()} method. | ||||
| */ | */ | ||||
| @@ -126,6 +126,8 @@ public abstract class ProjectComponent implements Cloneable { | |||||
| /** | /** | ||||
| * @since Ant 1.7 | * @since Ant 1.7 | ||||
| * @return a shallow copy of this projectcomponent. | * @return a shallow copy of this projectcomponent. | ||||
| * @throws CloneNotSupportedException does not happen, | |||||
| * but is declared to allow subclasses to do so. | |||||
| */ | */ | ||||
| public Object clone() throws CloneNotSupportedException { | public Object clone() throws CloneNotSupportedException { | ||||
| ProjectComponent pc = (ProjectComponent) super.clone(); | ProjectComponent pc = (ProjectComponent) super.clone(); | ||||
| @@ -212,7 +212,15 @@ public class UnknownElement extends Task { | |||||
| } | } | ||||
| /** | /** | ||||
| * Delegate to realThing if present and if it as task. | |||||
| * @see Task#handleInput(byte[], int, int) | * @see Task#handleInput(byte[], int, int) | ||||
| * @param buffer the buffer into which data is to be read. | |||||
| * @param offset the offset into the buffer at which data is stored. | |||||
| * @param length the amount of data to read. | |||||
| * | |||||
| * @return the number of bytes read. | |||||
| * | |||||
| * @exception IOException if the data cannot be read. | |||||
| * @since Ant 1.6 | * @since Ant 1.6 | ||||
| */ | */ | ||||
| protected int handleInput(byte[] buffer, int offset, int length) | protected int handleInput(byte[] buffer, int offset, int length) | ||||
| @@ -133,7 +133,7 @@ public final class FixCrLfFilter extends BaseParamFilterReader implements Chaina | |||||
| * @return a new filter based on this configuration, but filtering the | * @return a new filter based on this configuration, but filtering the | ||||
| * specified reader. | * specified reader. | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| try { | try { | ||||
| FixCrLfFilter newFilter = new FixCrLfFilter(rdr); | FixCrLfFilter newFilter = new FixCrLfFilter(rdr); | ||||
| @@ -289,7 +289,7 @@ public final class FixCrLfFilter extends BaseParamFilterReader implements Chaina | |||||
| * if the underlying stream throws an IOException during | * if the underlying stream throws an IOException during | ||||
| * reading. | * reading. | ||||
| */ | */ | ||||
| public synchronized final int read() throws IOException { | |||||
| public synchronized int read() throws IOException { | |||||
| if (!initialized) { | if (!initialized) { | ||||
| initInternalFilters(); | initInternalFilters(); | ||||
| } | } | ||||
| @@ -40,7 +40,7 @@ public final class JavaClassHelper { | |||||
| * @return a StringBuffer contains the name=value pairs | * @return a StringBuffer contains the name=value pairs | ||||
| * @exception IOException if an error occurs | * @exception IOException if an error occurs | ||||
| */ | */ | ||||
| public static final StringBuffer getConstants(byte[] bytes) | |||||
| public static StringBuffer getConstants(byte[] bytes) | |||||
| throws IOException { | throws IOException { | ||||
| final StringBuffer sb = new StringBuffer(); | final StringBuffer sb = new StringBuffer(); | ||||
| final ByteArrayInputStream bis = new ByteArrayInputStream(bytes); | final ByteArrayInputStream bis = new ByteArrayInputStream(bytes); | ||||
| @@ -32,7 +32,7 @@ public class DefaultExecutor implements Executor { | |||||
| private static final SingleCheckExecutor SUB_EXECUTOR = new SingleCheckExecutor(); | private static final SingleCheckExecutor SUB_EXECUTOR = new SingleCheckExecutor(); | ||||
| //inherit doc | |||||
| /** {@inheritDoc}. */ | |||||
| public void executeTargets(Project project, String[] targetNames) | public void executeTargets(Project project, String[] targetNames) | ||||
| throws BuildException { | throws BuildException { | ||||
| BuildException thrownException = null; | BuildException thrownException = null; | ||||
| @@ -52,7 +52,7 @@ public class DefaultExecutor implements Executor { | |||||
| } | } | ||||
| } | } | ||||
| //inherit doc | |||||
| /** {@inheritDoc}. */ | |||||
| public Executor getSubProjectExecutor() { | public Executor getSubProjectExecutor() { | ||||
| return SUB_EXECUTOR; | return SUB_EXECUTOR; | ||||
| } | } | ||||
| @@ -32,14 +32,14 @@ import org.apache.tools.ant.BuildException; | |||||
| */ | */ | ||||
| public class SingleCheckExecutor implements Executor { | public class SingleCheckExecutor implements Executor { | ||||
| //inherit doc | |||||
| /** {@inheritDoc}. */ | |||||
| public void executeTargets(Project project, String[] targetNames) | public void executeTargets(Project project, String[] targetNames) | ||||
| throws BuildException { | throws BuildException { | ||||
| project.executeSortedTargets( | project.executeSortedTargets( | ||||
| project.topoSort(targetNames, project.getTargets(), false)); | project.topoSort(targetNames, project.getTargets(), false)); | ||||
| } | } | ||||
| //inherit doc | |||||
| /** {@inheritDoc}. */ | |||||
| public Executor getSubProjectExecutor() { | public Executor getSubProjectExecutor() { | ||||
| return this; | return this; | ||||
| } | } | ||||
| @@ -201,6 +201,7 @@ public final class AnsiColorLogger extends DefaultLogger { | |||||
| /** | /** | ||||
| * @see DefaultLogger#printMessage | * @see DefaultLogger#printMessage | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| protected void printMessage(final String message, | protected void printMessage(final String message, | ||||
| final PrintStream stream, | final PrintStream stream, | ||||
| final int priority) { | final int priority) { | ||||
| @@ -101,9 +101,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| return log; | return log; | ||||
| } | } | ||||
| /** | |||||
| * @see BuildListener#buildStarted | |||||
| */ | |||||
| /** {@inheritDoc}. */ | |||||
| public void buildStarted(BuildEvent event) { | public void buildStarted(BuildEvent event) { | ||||
| String categoryString = PROJECT_LOG; | String categoryString = PROJECT_LOG; | ||||
| Log log = getLog(categoryString, null); | Log log = getLog(categoryString, null); | ||||
| @@ -113,9 +111,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * @see BuildListener#buildFinished | |||||
| */ | |||||
| /** {@inheritDoc}. */ | |||||
| public void buildFinished(BuildEvent event) { | public void buildFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| String categoryString = PROJECT_LOG; | String categoryString = PROJECT_LOG; | ||||
| @@ -133,6 +129,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| /** | /** | ||||
| * @see BuildListener#targetStarted | * @see BuildListener#targetStarted | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void targetStarted(BuildEvent event) { | public void targetStarted(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Log log = getLog(TARGET_LOG, | Log log = getLog(TARGET_LOG, | ||||
| @@ -147,6 +144,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| /** | /** | ||||
| * @see BuildListener#targetFinished | * @see BuildListener#targetFinished | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void targetFinished(BuildEvent event) { | public void targetFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| String targetName = event.getTarget().getName(); | String targetName = event.getTarget().getName(); | ||||
| @@ -165,6 +163,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| /** | /** | ||||
| * @see BuildListener#taskStarted | * @see BuildListener#taskStarted | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void taskStarted(BuildEvent event) { | public void taskStarted(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Task task = event.getTask(); | Task task = event.getTask(); | ||||
| @@ -186,6 +185,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| /** | /** | ||||
| * @see BuildListener#taskFinished | * @see BuildListener#taskFinished | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void taskFinished(BuildEvent event) { | public void taskFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Task task = event.getTask(); | Task task = event.getTask(); | ||||
| @@ -214,6 +214,7 @@ public class CommonsLoggingListener implements BuildListener, BuildLogger { | |||||
| /** | /** | ||||
| * @see BuildListener#messageLogged | * @see BuildListener#messageLogged | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void messageLogged(BuildEvent event) { | public void messageLogged(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Object categoryObject = event.getTask(); | Object categoryObject = event.getTask(); | ||||
| @@ -58,6 +58,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#buildStarted | * @see BuildListener#buildStarted | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void buildStarted(BuildEvent event) { | public void buildStarted(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Logger log = Logger.getLogger(Project.class.getName()); | Logger log = Logger.getLogger(Project.class.getName()); | ||||
| @@ -68,6 +69,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#buildFinished | * @see BuildListener#buildFinished | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void buildFinished(BuildEvent event) { | public void buildFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Logger log = Logger.getLogger(Project.class.getName()); | Logger log = Logger.getLogger(Project.class.getName()); | ||||
| @@ -82,6 +84,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#targetStarted | * @see BuildListener#targetStarted | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void targetStarted(BuildEvent event) { | public void targetStarted(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Logger log = Logger.getLogger(Target.class.getName()); | Logger log = Logger.getLogger(Target.class.getName()); | ||||
| @@ -92,6 +95,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#targetFinished | * @see BuildListener#targetFinished | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void targetFinished(BuildEvent event) { | public void targetFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| String targetName = event.getTarget().getName(); | String targetName = event.getTarget().getName(); | ||||
| @@ -108,6 +112,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#taskStarted | * @see BuildListener#taskStarted | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void taskStarted(BuildEvent event) { | public void taskStarted(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Task task = event.getTask(); | Task task = event.getTask(); | ||||
| @@ -119,6 +124,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#taskFinished | * @see BuildListener#taskFinished | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void taskFinished(BuildEvent event) { | public void taskFinished(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Task task = event.getTask(); | Task task = event.getTask(); | ||||
| @@ -135,6 +141,7 @@ public class Log4jListener implements BuildListener { | |||||
| /** | /** | ||||
| * @see BuildListener#messageLogged | * @see BuildListener#messageLogged | ||||
| */ | */ | ||||
| /** {@inheritDoc}. */ | |||||
| public void messageLogged(BuildEvent event) { | public void messageLogged(BuildEvent event) { | ||||
| if (initialized) { | if (initialized) { | ||||
| Object categoryObject = event.getTask(); | Object categoryObject = event.getTask(); | ||||
| @@ -54,6 +54,10 @@ public class TimestampedLogger extends DefaultLogger { | |||||
| return super.getBuildSuccessfulMessage() + SPACER + getTimestamp(); | return super.getBuildSuccessfulMessage() + SPACER + getTimestamp(); | ||||
| } | } | ||||
| /** | |||||
| * Get the current time. | |||||
| * @return the current time as a formatted string. | |||||
| */ | |||||
| protected String getTimestamp() { | protected String getTimestamp() { | ||||
| Date date = new Date(System.currentTimeMillis()); | Date date = new Date(System.currentTimeMillis()); | ||||
| DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); | DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); | ||||
| @@ -25,5 +25,7 @@ import org.apache.tools.ant.AntClassLoader; | |||||
| * Just use {@link AntClassLoader} itself. | * Just use {@link AntClassLoader} itself. | ||||
| */ | */ | ||||
| public class AntClassLoader2 extends AntClassLoader { | public class AntClassLoader2 extends AntClassLoader { | ||||
| public AntClassLoader2() {} | |||||
| /** No args constructor. */ | |||||
| public AntClassLoader2() { | |||||
| } | |||||
| } | } | ||||