001/* 002 * Entry.java July 2006 003 * 004 * Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net> 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 015 * implied. See the License for the specific language governing 016 * permissions and limitations under the License. 017 */ 018 019package org.simpleframework.xml.util; 020 021/** 022 * The <code>Entry</code> object represents entries to the dictionary 023 * object. Every entry must have a name attribute, which is used to 024 * establish mappings within the <code>Dictionary</code> object. Each 025 * entry entered into the dictionary can be retrieved using its name. 026 * <p> 027 * The entry can be serialzed with the dictionary to an XML document. 028 * Items stored within the dictionary need to extend this entry 029 * object to ensure that they can be mapped and serialized with the 030 * dictionary. Implementations should override the root annotation. 031 * 032 * @author Niall Gallagher 033 */ 034public interface Entry { 035 036 /** 037 * Represents the name of the entry instance used for mappings. 038 * This will be used to map the object to the internal map in 039 * the <code>Dictionary</code>. This allows serialized objects 040 * to be added to the dictionary transparently. 041 * 042 * @return this returns the name of the entry that is used 043 */ 044 String getName(); 045}