KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > betwixt > io > WriteContext


1 /*
2  * Copyright 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  
17 package org.apache.commons.betwixt.io;
18
19 import org.apache.commons.betwixt.ElementDescriptor;
20
21 /**
22  * <p>Context against which content should be written.</p>
23  * <p>
24  * <strong>Usage:</strong>
25  * This (logical) interface is a <em>Parameter Object</em>
26  * allowing additional, <code>Betwixt</code>-specific information
27  * to be passed through the SAX-inspired writing API.
28  * </p>
29  * <p>
30  * It is likely that access will be required to methods in the
31  * <code>Context</code> used by the {@link AbstractBeanWriter}
32  * but it seems better to add these as neccessary using delegation
33  * rather than extending {@link Context}.
34  * </p>
35  * @author <a HREF='http://jakarta.apache.org/'>Jakarta Commons Team</a>
36  * @since 0.5
37  */

38 public abstract class WriteContext {
39     
40     /**
41      * Gets the descriptor for the element who content
42      * is currently being created.
43      *
44      * @return the <code>ElementDescriptor</code> for the
45      * current element (or null if there is no current element)
46      */

47     public abstract ElementDescriptor getCurrentDescriptor();
48     
49 }
50
Popular Tags