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 */
016package org.joda.beans.impl.direct;
017
018import org.joda.beans.MetaProperty;
019import org.joda.beans.impl.BasicMetaBean;
020
021/**
022 * A meta-bean implementation designed for use by {@code DirectBean}.
023 * <p>
024 * This implementation uses direct access via {@link #metaPropertyGet(String)} to avoid reflection.
025 * 
026 * @author Stephen Colebourne
027 */
028public abstract class DirectMetaBean extends BasicMetaBean {
029    // overriding other methods has negligible effect considering DirectMetaPropertyMap
030
031    /**
032     * Gets the meta-property by name.
033     * <p>
034     * This implementation returns null, and must be overridden in subclasses.
035     * 
036     * @param propertyName  the property name, not null
037     * @return the meta-property, null if not found
038     */
039    protected MetaProperty<?> metaPropertyGet(String propertyName) {
040        return null;
041    }
042
043}