Package org.dmd.dmt.shared.generated.types

Source Code of org.dmd.dmt.shared.generated.types.DmcTypeUsingIndexedAttributesREF

package org.dmd.dmt.shared.generated.types;

import java.io.Serializable;
import org.dmd.dmc.DmcInputStreamIF;
import org.dmd.dmc.DmcOutputStreamIF;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcValueException;
import org.dmd.dmt.shared.generated.dmo.UsingIndexedAttributesDMO;

/**
* This is the generated DmcAttribute derivative for values of type UsingIndexedAttributes
* <P>
* Generated from the dmt schema at version 0.1
* <P>
* This code was auto-generated by the dmogenerator utility and shouldn't be alterred manually!
* Generated from: org.dmd.dms.util.DmoTypeFormatter.dumpNormalREFType(DmoTypeFormatter.java:197)
*/
@SuppressWarnings("serial")
abstract public class DmcTypeUsingIndexedAttributesREF extends DmcAttribute<UsingIndexedAttributesDMO> implements Serializable {

    public DmcTypeUsingIndexedAttributesREF(){
    }

    public DmcTypeUsingIndexedAttributesREF(DmcAttributeInfo ai){
        super(ai);
    }

    protected UsingIndexedAttributesDMO typeCheck(Object value) throws DmcValueException {
        if (value instanceof UsingIndexedAttributesDMO)
            return((UsingIndexedAttributesDMO)value);
       
        throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with UsingIndexedAttributesDMO expected."));
    }

    @Override
    public void serializeValue(DmcOutputStreamIF dos, UsingIndexedAttributesDMO value) throws Exception {
        value.serializeIt(dos);
    }

    @Override
    public UsingIndexedAttributesDMO deserializeValue(DmcInputStreamIF dis) throws Exception {
        UsingIndexedAttributesDMO rc = (UsingIndexedAttributesDMO)dis.getDMOInstance(dis);
        rc.deserializeIt(dis);
        return(rc);
    }

    @Override
    public UsingIndexedAttributesDMO cloneValue(UsingIndexedAttributesDMO value){
        return((UsingIndexedAttributesDMO)value.cloneIt());
    }

}
TOP

Related Classes of org.dmd.dmt.shared.generated.types.DmcTypeUsingIndexedAttributesREF

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.