git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277456 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2002,2004 The Apache Software Foundation | |||||
| * Copyright 2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -83,7 +83,7 @@ public final class ClassConstants | |||||
| * during reading, or if the constants for the specified class cannot | * during reading, or if the constants for the specified class cannot | ||||
| * be read (for example due to the class not being found). | * be read (for example due to the class not being found). | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| int ch = -1; | int ch = -1; | ||||
| @@ -150,7 +150,7 @@ public final class ClassConstants | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| ClassConstants newFilter = new ClassConstants(rdr); | ClassConstants newFilter = new ClassConstants(rdr); | ||||
| return newFilter; | return newFilter; | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2003-2004 The Apache Software Foundation | |||||
| * Copyright 2003-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -121,7 +121,7 @@ public class EscapeUnicode | |||||
| /** | /** | ||||
| * Parses the parameters (currently unused) | * Parses the parameters (currently unused) | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2002,2004 The Apache Software Foundation | |||||
| * Copyright 2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -67,7 +67,7 @@ public final class ExpandProperties | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| int ch = -1; | int ch = -1; | ||||
| @@ -104,7 +104,7 @@ public final class ExpandProperties | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| ExpandProperties newFilter = new ExpandProperties(rdr); | ExpandProperties newFilter = new ExpandProperties(rdr); | ||||
| newFilter.setProject(getProject()); | newFilter.setProject(getProject()); | ||||
| return newFilter; | return newFilter; | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -94,7 +94,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -122,7 +122,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @param lines the number of lines to be returned in the filtered stream | * @param lines the number of lines to be returned in the filtered stream | ||||
| */ | */ | ||||
| public final void setLines(final long lines) { | |||||
| public void setLines(final long lines) { | |||||
| this.lines = lines; | this.lines = lines; | ||||
| } | } | ||||
| @@ -131,7 +131,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @return the number of lines to be returned in the filtered stream | * @return the number of lines to be returned in the filtered stream | ||||
| */ | */ | ||||
| private final long getLines() { | |||||
| private long getLines() { | |||||
| return lines; | return lines; | ||||
| } | } | ||||
| @@ -140,7 +140,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @param skip the number of lines to be skipped in the filtered stream | * @param skip the number of lines to be skipped in the filtered stream | ||||
| */ | */ | ||||
| public final void setSkip(final long skip) { | |||||
| public void setSkip(final long skip) { | |||||
| this.skip = skip; | this.skip = skip; | ||||
| } | } | ||||
| @@ -149,7 +149,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @return the number of lines to be skipped in the filtered stream | * @return the number of lines to be skipped in the filtered stream | ||||
| */ | */ | ||||
| private final long getSkip() { | |||||
| private long getSkip() { | |||||
| return skip; | return skip; | ||||
| } | } | ||||
| @@ -163,7 +163,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| HeadFilter newFilter = new HeadFilter(rdr); | HeadFilter newFilter = new HeadFilter(rdr); | ||||
| newFilter.setLines(getLines()); | newFilter.setLines(getLines()); | ||||
| newFilter.setSkip(getSkip()); | newFilter.setSkip(getSkip()); | ||||
| @@ -176,7 +176,7 @@ public final class HeadFilter extends BaseParamFilterReader | |||||
| * it to set the number of lines to be returned in the filtered stream. | * it to set the number of lines to be returned in the filtered stream. | ||||
| * also scan for skip parameter. | * also scan for skip parameter. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -88,7 +88,7 @@ public final class LineContains | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -138,7 +138,7 @@ public final class LineContains | |||||
| * @param contains The <code>contains</code> element to add. | * @param contains The <code>contains</code> element to add. | ||||
| * Must not be <code>null</code>. | * Must not be <code>null</code>. | ||||
| */ | */ | ||||
| public final void addConfiguredContains(final Contains contains) { | |||||
| public void addConfiguredContains(final Contains contains) { | |||||
| this.contains.addElement(contains.getValue()); | this.contains.addElement(contains.getValue()); | ||||
| } | } | ||||
| @@ -162,7 +162,7 @@ public final class LineContains | |||||
| * returned object is "live" - in other words, changes made to the | * returned object is "live" - in other words, changes made to the | ||||
| * returned object are mirrored in the filter. | * returned object are mirrored in the filter. | ||||
| */ | */ | ||||
| private final Vector getContains() { | |||||
| private Vector getContains() { | |||||
| return contains; | return contains; | ||||
| } | } | ||||
| @@ -176,7 +176,7 @@ public final class LineContains | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| LineContains newFilter = new LineContains(rdr); | LineContains newFilter = new LineContains(rdr); | ||||
| newFilter.setContains(getContains()); | newFilter.setContains(getContains()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -186,7 +186,7 @@ public final class LineContains | |||||
| /** | /** | ||||
| * Parses the parameters to add user-defined contains strings. | * Parses the parameters to add user-defined contains strings. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -87,7 +87,7 @@ public final class LineContainsRegExp | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -140,7 +140,7 @@ public final class LineContainsRegExp | |||||
| * @param regExp The <code>regexp</code> element to add. | * @param regExp The <code>regexp</code> element to add. | ||||
| * Must not be <code>null</code>. | * Must not be <code>null</code>. | ||||
| */ | */ | ||||
| public final void addConfiguredRegexp(final RegularExpression regExp) { | |||||
| public void addConfiguredRegexp(final RegularExpression regExp) { | |||||
| this.regexps.addElement(regExp); | this.regexps.addElement(regExp); | ||||
| } | } | ||||
| @@ -167,7 +167,7 @@ public final class LineContainsRegExp | |||||
| * filter. The returned object is "live" - in other words, changes made to | * filter. The returned object is "live" - in other words, changes made to | ||||
| * the returned object are mirrored in the filter. | * the returned object are mirrored in the filter. | ||||
| */ | */ | ||||
| private final Vector getRegexps() { | |||||
| private Vector getRegexps() { | |||||
| return regexps; | return regexps; | ||||
| } | } | ||||
| @@ -181,7 +181,7 @@ public final class LineContainsRegExp | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| LineContainsRegExp newFilter = new LineContainsRegExp(rdr); | LineContainsRegExp newFilter = new LineContainsRegExp(rdr); | ||||
| newFilter.setRegexps(getRegexps()); | newFilter.setRegexps(getRegexps()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -191,7 +191,7 @@ public final class LineContainsRegExp | |||||
| /** | /** | ||||
| * Parses parameters to add user defined regular expressions. | * Parses parameters to add user defined regular expressions. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2002,2004 The Apache Software Foundation | |||||
| * Copyright 2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -76,7 +76,7 @@ public final class PrefixLines | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -115,7 +115,7 @@ public final class PrefixLines | |||||
| * May be <code>null</code>, in which case no prefix | * May be <code>null</code>, in which case no prefix | ||||
| * is added. | * is added. | ||||
| */ | */ | ||||
| public final void setPrefix(final String prefix) { | |||||
| public void setPrefix(final String prefix) { | |||||
| this.prefix = prefix; | this.prefix = prefix; | ||||
| } | } | ||||
| @@ -124,7 +124,7 @@ public final class PrefixLines | |||||
| * | * | ||||
| * @return the prefix which will be added at the start of each input line | * @return the prefix which will be added at the start of each input line | ||||
| */ | */ | ||||
| private final String getPrefix() { | |||||
| private String getPrefix() { | |||||
| return prefix; | return prefix; | ||||
| } | } | ||||
| @@ -138,7 +138,7 @@ public final class PrefixLines | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| PrefixLines newFilter = new PrefixLines(rdr); | PrefixLines newFilter = new PrefixLines(rdr); | ||||
| newFilter.setPrefix(getPrefix()); | newFilter.setPrefix(getPrefix()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -148,7 +148,7 @@ public final class PrefixLines | |||||
| /** | /** | ||||
| * Initializes the prefix if it is available from the parameters. | * Initializes the prefix if it is available from the parameters. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -111,7 +111,7 @@ public final class ReplaceTokens | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -177,7 +177,7 @@ public final class ReplaceTokens | |||||
| * | * | ||||
| * @param beginToken the character used to denote the beginning of a token | * @param beginToken the character used to denote the beginning of a token | ||||
| */ | */ | ||||
| public final void setBeginToken(final char beginToken) { | |||||
| public void setBeginToken(final char beginToken) { | |||||
| this.beginToken = beginToken; | this.beginToken = beginToken; | ||||
| } | } | ||||
| @@ -186,7 +186,7 @@ public final class ReplaceTokens | |||||
| * | * | ||||
| * @return the character used to denote the beginning of a token | * @return the character used to denote the beginning of a token | ||||
| */ | */ | ||||
| private final char getBeginToken() { | |||||
| private char getBeginToken() { | |||||
| return beginToken; | return beginToken; | ||||
| } | } | ||||
| @@ -195,7 +195,7 @@ public final class ReplaceTokens | |||||
| * | * | ||||
| * @param endToken the character used to denote the end of a token | * @param endToken the character used to denote the end of a token | ||||
| */ | */ | ||||
| public final void setEndToken(final char endToken) { | |||||
| public void setEndToken(final char endToken) { | |||||
| this.endToken = endToken; | this.endToken = endToken; | ||||
| } | } | ||||
| @@ -204,7 +204,7 @@ public final class ReplaceTokens | |||||
| * | * | ||||
| * @return the character used to denote the end of a token | * @return the character used to denote the end of a token | ||||
| */ | */ | ||||
| private final char getEndToken() { | |||||
| private char getEndToken() { | |||||
| return endToken; | return endToken; | ||||
| } | } | ||||
| @@ -214,7 +214,7 @@ public final class ReplaceTokens | |||||
| * @param token The token to add to the map of replacements. | * @param token The token to add to the map of replacements. | ||||
| * Must not be <code>null</code>. | * Must not be <code>null</code>. | ||||
| */ | */ | ||||
| public final void addConfiguredToken(final Token token) { | |||||
| public void addConfiguredToken(final Token token) { | |||||
| hash.put(token.getKey(), token.getValue()); | hash.put(token.getKey(), token.getValue()); | ||||
| } | } | ||||
| @@ -234,7 +234,7 @@ public final class ReplaceTokens | |||||
| * @return a map (String->String) of token keys to replacement | * @return a map (String->String) of token keys to replacement | ||||
| * values | * values | ||||
| */ | */ | ||||
| private final Hashtable getTokens() { | |||||
| private Hashtable getTokens() { | |||||
| return hash; | return hash; | ||||
| } | } | ||||
| @@ -248,7 +248,7 @@ public final class ReplaceTokens | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| ReplaceTokens newFilter = new ReplaceTokens(rdr); | ReplaceTokens newFilter = new ReplaceTokens(rdr); | ||||
| newFilter.setBeginToken(getBeginToken()); | newFilter.setBeginToken(getBeginToken()); | ||||
| newFilter.setEndToken(getEndToken()); | newFilter.setEndToken(getEndToken()); | ||||
| @@ -260,7 +260,7 @@ public final class ReplaceTokens | |||||
| /** | /** | ||||
| * Initializes tokens and loads the replacee-replacer hashtable. | * Initializes tokens and loads the replacee-replacer hashtable. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -78,7 +78,7 @@ public final class StripJavaComments | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| int ch = -1; | int ch = -1; | ||||
| if (readAheadCh != -1) { | if (readAheadCh != -1) { | ||||
| ch = readAheadCh; | ch = readAheadCh; | ||||
| @@ -137,7 +137,7 @@ public final class StripJavaComments | |||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| StripJavaComments newFilter = new StripJavaComments(rdr); | StripJavaComments newFilter = new StripJavaComments(rdr); | ||||
| return newFilter; | return newFilter; | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2002,2004 The Apache Software Foundation | |||||
| * Copyright 2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -77,7 +77,7 @@ public final class StripLineBreaks | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -100,7 +100,7 @@ public final class StripLineBreaks | |||||
| * @param lineBreaks A String containing all the characters to be | * @param lineBreaks A String containing all the characters to be | ||||
| * considered as line-breaking. | * considered as line-breaking. | ||||
| */ | */ | ||||
| public final void setLineBreaks(final String lineBreaks) { | |||||
| public void setLineBreaks(final String lineBreaks) { | |||||
| this.lineBreaks = lineBreaks; | this.lineBreaks = lineBreaks; | ||||
| } | } | ||||
| @@ -110,7 +110,7 @@ public final class StripLineBreaks | |||||
| * @return a String containing all the characters considered as | * @return a String containing all the characters considered as | ||||
| * line-breaking | * line-breaking | ||||
| */ | */ | ||||
| private final String getLineBreaks() { | |||||
| private String getLineBreaks() { | |||||
| return lineBreaks; | return lineBreaks; | ||||
| } | } | ||||
| @@ -124,7 +124,7 @@ public final class StripLineBreaks | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| StripLineBreaks newFilter = new StripLineBreaks(rdr); | StripLineBreaks newFilter = new StripLineBreaks(rdr); | ||||
| newFilter.setLineBreaks(getLineBreaks()); | newFilter.setLineBreaks(getLineBreaks()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -134,7 +134,7 @@ public final class StripLineBreaks | |||||
| /** | /** | ||||
| * Parses the parameters to set the line-breaking characters. | * Parses the parameters to set the line-breaking characters. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| String userDefinedLineBreaks = null; | String userDefinedLineBreaks = null; | ||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -88,7 +88,7 @@ public final class StripLineComments | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -138,7 +138,7 @@ public final class StripLineComments | |||||
| * @param comment The <code>comment</code> element to add to the | * @param comment The <code>comment</code> element to add to the | ||||
| * list of comment prefixes to strip. Must not be <code>null</code>. | * list of comment prefixes to strip. Must not be <code>null</code>. | ||||
| */ | */ | ||||
| public final void addConfiguredComment(final Comment comment) { | |||||
| public void addConfiguredComment(final Comment comment) { | |||||
| comments.addElement(comment.getValue()); | comments.addElement(comment.getValue()); | ||||
| } | } | ||||
| @@ -157,7 +157,7 @@ public final class StripLineComments | |||||
| * | * | ||||
| * @return the list of comment prefixes to strip. | * @return the list of comment prefixes to strip. | ||||
| */ | */ | ||||
| private final Vector getComments() { | |||||
| private Vector getComments() { | |||||
| return comments; | return comments; | ||||
| } | } | ||||
| @@ -171,7 +171,7 @@ public final class StripLineComments | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| StripLineComments newFilter = new StripLineComments(rdr); | StripLineComments newFilter = new StripLineComments(rdr); | ||||
| newFilter.setComments(getComments()); | newFilter.setComments(getComments()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -181,7 +181,7 @@ public final class StripLineComments | |||||
| /** | /** | ||||
| * Parses the parameters to set the comment prefixes. | * Parses the parameters to set the comment prefixes. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2002,2004 The Apache Software Foundation | |||||
| * Copyright 2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -78,7 +78,7 @@ public final class TabsToSpaces | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -104,7 +104,7 @@ public final class TabsToSpaces | |||||
| * | * | ||||
| * @param tabLength the number of spaces to be used when converting a tab. | * @param tabLength the number of spaces to be used when converting a tab. | ||||
| */ | */ | ||||
| public final void setTablength(final int tabLength) { | |||||
| public void setTablength(final int tabLength) { | |||||
| this.tabLength = tabLength; | this.tabLength = tabLength; | ||||
| } | } | ||||
| @@ -113,7 +113,7 @@ public final class TabsToSpaces | |||||
| * | * | ||||
| * @return the number of spaces used when converting a tab | * @return the number of spaces used when converting a tab | ||||
| */ | */ | ||||
| private final int getTablength() { | |||||
| private int getTablength() { | |||||
| return tabLength; | return tabLength; | ||||
| } | } | ||||
| @@ -127,7 +127,7 @@ public final class TabsToSpaces | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| TabsToSpaces newFilter = new TabsToSpaces(rdr); | TabsToSpaces newFilter = new TabsToSpaces(rdr); | ||||
| newFilter.setTablength(getTablength()); | newFilter.setTablength(getTablength()); | ||||
| newFilter.setInitialized(true); | newFilter.setInitialized(true); | ||||
| @@ -137,7 +137,7 @@ public final class TabsToSpaces | |||||
| /** | /** | ||||
| * Parses the parameters to set the tab length. | * Parses the parameters to set the tab length. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -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"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -100,7 +100,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * @exception IOException if the underlying stream throws an IOException | * @exception IOException if the underlying stream throws an IOException | ||||
| * during reading | * during reading | ||||
| */ | */ | ||||
| public final int read() throws IOException { | |||||
| public int read() throws IOException { | |||||
| if (!getInitialized()) { | if (!getInitialized()) { | ||||
| initialize(); | initialize(); | ||||
| setInitialized(true); | setInitialized(true); | ||||
| @@ -128,7 +128,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @param lines the number of lines to be returned in the filtered stream | * @param lines the number of lines to be returned in the filtered stream | ||||
| */ | */ | ||||
| public final void setLines(final long lines) { | |||||
| public void setLines(final long lines) { | |||||
| this.lines = lines; | this.lines = lines; | ||||
| } | } | ||||
| @@ -137,7 +137,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @return the number of lines to be returned in the filtered stream | * @return the number of lines to be returned in the filtered stream | ||||
| */ | */ | ||||
| private final long getLines() { | |||||
| private long getLines() { | |||||
| return lines; | return lines; | ||||
| } | } | ||||
| @@ -146,7 +146,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @param skip the number of lines to be skipped in the filtered stream | * @param skip the number of lines to be skipped in the filtered stream | ||||
| */ | */ | ||||
| public final void setSkip(final long skip) { | |||||
| public void setSkip(final long skip) { | |||||
| this.skip = skip; | this.skip = skip; | ||||
| } | } | ||||
| @@ -155,7 +155,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * | * | ||||
| * @return the number of lines to be skipped in the filtered stream | * @return the number of lines to be skipped in the filtered stream | ||||
| */ | */ | ||||
| private final long getSkip() { | |||||
| private long getSkip() { | |||||
| return skip; | return skip; | ||||
| } | } | ||||
| @@ -169,7 +169,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * @return a new filter based on this configuration, but filtering | * @return a new filter based on this configuration, but filtering | ||||
| * the specified reader | * the specified reader | ||||
| */ | */ | ||||
| public final Reader chain(final Reader rdr) { | |||||
| public Reader chain(final Reader rdr) { | |||||
| TailFilter newFilter = new TailFilter(rdr); | TailFilter newFilter = new TailFilter(rdr); | ||||
| newFilter.setLines(getLines()); | newFilter.setLines(getLines()); | ||||
| newFilter.setSkip(getSkip()); | newFilter.setSkip(getSkip()); | ||||
| @@ -182,7 +182,7 @@ public final class TailFilter extends BaseParamFilterReader | |||||
| * it to set the number of lines to be returned in the filtered stream. | * it to set the number of lines to be returned in the filtered stream. | ||||
| * also scan for "skip" parameter. | * also scan for "skip" parameter. | ||||
| */ | */ | ||||
| private final void initialize() { | |||||
| private void initialize() { | |||||
| Parameter[] params = getParameters(); | Parameter[] params = getParameters(); | ||||
| if (params != null) { | if (params != null) { | ||||
| for (int i = 0; i < params.length; i++) { | for (int i = 0; i < params.length; i++) { | ||||
| @@ -64,7 +64,7 @@ public final class ChainReaderHelper { | |||||
| * Sets the primary reader | * Sets the primary reader | ||||
| * @param rdr the reader object | * @param rdr the reader object | ||||
| */ | */ | ||||
| public final void setPrimaryReader(Reader rdr) { | |||||
| public void setPrimaryReader(Reader rdr) { | |||||
| primaryReader = rdr; | primaryReader = rdr; | ||||
| } | } | ||||
| @@ -72,7 +72,7 @@ public final class ChainReaderHelper { | |||||
| * Set the project to work with | * Set the project to work with | ||||
| * @param project the current project | * @param project the current project | ||||
| */ | */ | ||||
| public final void setProject(final Project project) { | |||||
| public void setProject(final Project project) { | |||||
| this.project = project; | this.project = project; | ||||
| } | } | ||||
| @@ -81,7 +81,7 @@ public final class ChainReaderHelper { | |||||
| * | * | ||||
| * @return the current project | * @return the current project | ||||
| */ | */ | ||||
| public final Project getProject() { | |||||
| public Project getProject() { | |||||
| return project; | return project; | ||||
| } | } | ||||
| @@ -90,7 +90,7 @@ public final class ChainReaderHelper { | |||||
| * if this method is not invoked. | * if this method is not invoked. | ||||
| * @param size the buffer size to use | * @param size the buffer size to use | ||||
| */ | */ | ||||
| public final void setBufferSize(int size) { | |||||
| public void setBufferSize(int size) { | |||||
| bufferSize = size; | bufferSize = size; | ||||
| } | } | ||||
| @@ -99,7 +99,7 @@ public final class ChainReaderHelper { | |||||
| * | * | ||||
| * @param fchain the filter chains collection | * @param fchain the filter chains collection | ||||
| */ | */ | ||||
| public final void setFilterChains(Vector fchain) { | |||||
| public void setFilterChains(Vector fchain) { | |||||
| filterChains = fchain; | filterChains = fchain; | ||||
| } | } | ||||
| @@ -108,7 +108,7 @@ public final class ChainReaderHelper { | |||||
| * @return the assembled reader | * @return the assembled reader | ||||
| * @exception BuildException if an error occurs | * @exception BuildException if an error occurs | ||||
| */ | */ | ||||
| public final Reader getAssembledReader() throws BuildException { | |||||
| public Reader getAssembledReader() throws BuildException { | |||||
| if (primaryReader == null) { | if (primaryReader == null) { | ||||
| throw new BuildException("primaryReader must not be null."); | throw new BuildException("primaryReader must not be null."); | ||||
| } | } | ||||
| @@ -226,7 +226,7 @@ public final class ChainReaderHelper { | |||||
| * @return the contents of the file as a string | * @return the contents of the file as a string | ||||
| * @exception IOException if an error occurs | * @exception IOException if an error occurs | ||||
| */ | */ | ||||
| public final String readFully(Reader rdr) | |||||
| public String readFully(Reader rdr) | |||||
| throws IOException { | throws IOException { | ||||
| return FileUtils.readFully(rdr, bufferSize); | return FileUtils.readFully(rdr, bufferSize); | ||||
| } | } | ||||