/*
 *  Copyright 2001-present Stephen Colebourne
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.joda.beans.sample;

import java.lang.invoke.MethodHandles;

import org.joda.beans.ImmutableBean;
import org.joda.beans.MetaBean;
import org.joda.beans.TypedMetaBean;
import org.joda.beans.gen.BeanDefinition;
import org.joda.beans.impl.light.LightMetaBean;

/**
 * Mock immutable empty bean, used for testing.
 * 
 * @author Stephen Colebourne
 */
@BeanDefinition(style = "light")
public final class LightEmpty implements ImmutableBean {

    //------------------------- AUTOGENERATED START -------------------------
    /**
     * The meta-bean for {@code LightEmpty}.
     */
    private static final TypedMetaBean<LightEmpty> META_BEAN =
            LightMetaBean.of(LightEmpty.class, MethodHandles.lookup());

    /**
     * The meta-bean for {@code LightEmpty}.
     * @return the meta-bean, not null
     */
    public static TypedMetaBean<LightEmpty> meta() {
        return META_BEAN;
    }

    static {
        MetaBean.register(META_BEAN);
    }

    private LightEmpty() {
    }

    @Override
    public TypedMetaBean<LightEmpty> metaBean() {
        return META_BEAN;
    }

    //-----------------------------------------------------------------------
    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj != null && obj.getClass() == this.getClass()) {
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = getClass().hashCode();
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder buf = new StringBuilder(32);
        buf.append("LightEmpty{");
        buf.append('}');
        return buf.toString();
    }

    //-------------------------- AUTOGENERATED END --------------------------
}
