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

cdc.mf.model.MfInheritance Maven / Gradle / Ivy

The newest version!
package cdc.mf.model;

public abstract class MfInheritance extends MfLink {
    protected MfInheritance(Builder builder,
                            MfElementFeatures features) {
        super(builder, features);
    }

    public MfType getSpecificType() {
        return getSource();
    }

    public abstract MfElementRef getGeneralTypeRef();

    public MfType getGeneralType() {
        return getGeneralTypeRef().get();
    }

    @Override
    public MfType getTarget() {
        return getGeneralType();
    }

    @Override
    public final MfElementRef getTargetRef() {
        return getGeneralTypeRef();
    }

    /**
     * Base builder of inheritances.
     *
     * @author Damien Carbonne
     *
     * @param  The builder type.
     * @param  The built element type.
     * @param 

The concrete parent type. */ public abstract static class Builder, E extends MfInheritance, P extends MfType> extends MfLink.Builder { protected Builder(P parent) { super(parent); } } }