1
/* ========================================================================
2
* JCommon : a free general purpose class library for the Java(tm) platform
3
* ========================================================================
5
* (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
7
* Project Info: http://www.jfree.org/jcommon/index.html
9
* This library is free software; you can redistribute it and/or modify it
10
* under the terms of the GNU Lesser General Public License as published by
11
* the Free Software Foundation; either version 2.1 of the License, or
12
* (at your option) any later version.
14
* This library is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17
* License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25
* in the United States and other countries.]
27
* ----------------------
28
* ManualMappingInfo.java
29
* ----------------------
30
* (C)opyright 2003, 2004, by Thomas Morgner and Contributors.
32
* Original Author: Thomas Morgner;
33
* Contributor(s): David Gilbert (for Object Refinery Limited);
35
* $Id: ManualMappingInfo.java,v 1.2 2005/10/18 13:32:37 mungady Exp $
38
* -------------------------
39
* 12.11.2003 : Initial version
43
package org.jfree.xml.generator.model;
46
* The manual mapping describes, how a certain class is handled in the parser.
47
* This defines the read and write handler implementations to be used to handle
48
* the instantiation or serialisation of the described type.
50
* Manual mappings will not be created by the generator, they have to be defined
51
* manually. The parser will print warnings, if the definitions are invalid.
53
* Manual mappings will always override automatic mappings.
55
public class ManualMappingInfo {
57
/** The base class. */
58
private Class baseClass;
60
/** The read handler. */
61
private Class readHandler;
63
/** The write handler. */
64
private Class writeHandler;
67
private Comments comments;
70
private String source;
73
* Creates a new manual mapping instance.
75
* @param baseClass the base class.
76
* @param readHandler the read handler class.
77
* @param writeHandler the write handler class.
79
public ManualMappingInfo(final Class baseClass, final Class readHandler, final Class writeHandler) {
80
this.baseClass = baseClass;
81
this.readHandler = readHandler;
82
this.writeHandler = writeHandler;
86
* Returns the base class.
88
* @return The base class.
90
public Class getBaseClass() {
91
return this.baseClass;
95
* Returns the read handler class.
97
* @return The read handler class.
99
public Class getReadHandler() {
100
return this.readHandler;
104
* Returns the write handler class.
106
* @return The write handler class.
108
public Class getWriteHandler() {
109
return this.writeHandler;
113
* Returns the comments.
115
* @return The comments.
117
public Comments getComments() {
118
return this.comments;
124
* @param comments the comments.
126
public void setComments(final Comments comments) {
127
this.comments = comments;
131
* Returns the source.
133
* @return The source.
135
public String getSource() {
142
* @param source the source.
144
public void setSource(final String source) {
145
this.source = source;