All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nakedobjects.metamodel.facets.object.immutable.DisabledFacetDerivedFromImmutable Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.metamodel.facets.object.immutable;

import org.nakedobjects.metamodel.adapter.NakedObject;
import org.nakedobjects.metamodel.facets.FacetHolder;
import org.nakedobjects.metamodel.facets.disable.DisabledFacetAbstract;


public class DisabledFacetDerivedFromImmutable extends DisabledFacetAbstract {

    public DisabledFacetDerivedFromImmutable(final ImmutableFacet immutableFacet, final FacetHolder holder) {
        super(immutableFacet.value(), holder);
    }

    public String disabledReason(final NakedObject target) {
        return when().isNowFor(target) ? "Immutable" : null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy