source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/src/main/org/apache/tools/ant/filters/BaseParamFilterReader.java@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.1 KB
Line 
1/*
2 * Copyright 2002,2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17package org.apache.tools.ant.filters;
18
19import java.io.Reader;
20import org.apache.tools.ant.types.Parameter;
21import org.apache.tools.ant.types.Parameterizable;
22
23/**
24 * Parameterized base class for core filter readers.
25 *
26 */
27public abstract class BaseParamFilterReader
28 extends BaseFilterReader
29 implements Parameterizable {
30 /** The passed in parameter array. */
31 private Parameter[] parameters;
32
33 /**
34 * Constructor for "dummy" instances.
35 *
36 * @see BaseFilterReader#BaseFilterReader()
37 */
38 public BaseParamFilterReader() {
39 super();
40 }
41
42 /**
43 * Creates a new filtered reader.
44 *
45 * @param in A Reader object providing the underlying stream.
46 * Must not be <code>null</code>.
47 */
48 public BaseParamFilterReader(final Reader in) {
49 super(in);
50 }
51
52 /**
53 * Sets the parameters used by this filter, and sets
54 * the filter to an uninitialized status.
55 *
56 * @param parameters The parameters to be used by this filter.
57 * Should not be <code>null</code>.
58 */
59 public final void setParameters(final Parameter[] parameters) {
60 this.parameters = parameters;
61 setInitialized(false);
62 }
63
64 /**
65 * Returns the parameters to be used by this filter.
66 *
67 * @return the parameters to be used by this filter
68 */
69 protected final Parameter[] getParameters() {
70 return parameters;
71 }
72}
Note: See TracBrowser for help on using the repository browser.