001 /*
002 * Copyright 2001-2013 Stephen Colebourne
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.joda.beans;
017
018 import java.util.Map;
019
020 /**
021 * A map of properties that is linked to a specific bean.
022 * <p>
023 * For a JavaBean, this will ultimately wrap get/set method pairs.
024 * Alternate implementations may perform any logic to obtain the value.
025 *
026 * @author Stephen Colebourne
027 */
028 public interface PropertyMap extends Map<String, Property<?>> {
029
030 /**
031 * Flattens the contents of this property map to a {@code Map}.
032 * <p>
033 * The returned map will contain all the properties from the bean with their actual values.
034 *
035 * @return the unmodifiable map of property name to value, not null
036 */
037 Map<String, Object> flatten();
038
039 }