KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > definition > ConfigurationParser


1 // Copyright 2007 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.definition;
16
17 import java.io.InputStream JavaDoc;
18
19 /**
20  * Parses configuration data that is provided in a textual format.
21  * A new instance is created for each parsing operation.
22  *
23  * @author Huegen
24  */

25 public interface ConfigurationParser
26 {
27     /**
28      * Parses a configuration and returns the converted data.
29      * @param context context
30      * @param data the data to parse as stream.
31      * @return the converted data.
32      */

33     public Object JavaDoc parse(ContributionContext context, InputStream JavaDoc data);
34     
35     /**
36      * Parses a configuration and returns the converted data.
37      * @param context context
38      * @param data the data to parse. What kind of object is expected here is parser specific.
39      * @return the converted data.
40      */

41     public Object JavaDoc parse(ContributionContext context, Object JavaDoc data);
42 }
43
Popular Tags