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

org.dmd.dmt.dsd.dsdb.shared.generated.types.DmcTypeModuleBREF Maven / Gradle / Ivy

Go to download

The dark-matter project provides mechanism to define concepts associated with Domain Specific Languages (DSLs) and generate code that can be extended with business logic that supports the given DSL purpose.

There is a newer version: 3.1.15
Show newest version
//	---------------------------------------------------------------------------
//	dark-matter-data
//	Copyright (c) 2013-2021 dark-matter-data committers
//	---------------------------------------------------------------------------
//	This program is free software; you can redistribute it and/or modify it
//	under the terms of the GNU Lesser General Public License as published by the
//	Free Software Foundation; either version 3 of the License, or (at your
//	option) any later version.
//	This program is distributed in the hope that it will be useful, but WITHOUT
//	ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//	FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
//	more details.
//	You should have received a copy of the GNU Lesser General Public License along
//	with this program; if not, see .
//	---------------------------------------------------------------------------
package org.dmd.dmt.dsd.dsdb.shared.generated.types;

import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcValueException;
import org.dmd.dmc.DmcOutputStreamIF;
import org.dmd.dmc.DmcInputStreamIF;
import org.dmd.dmc.types.DmcTypeNamedObjectREF;
import org.dmd.dmc.types.DefinitionName;

import org.dmd.dmt.dsd.dsdb.shared.generated.types.ModuleBREF;

import org.dmd.dmt.dsd.dsdb.shared.generated.dmo.ModuleBDMO;

/**
 * This is the generated DmcAttribute derivative for values of type ModuleB
 * 

* Generated from the dsdB schema at version unknown *

* This code was auto-generated by the dmogenerator utility and shouldn't be alterred manually! * Generated from: org.dmd.dms.util.DmoTypeFormatter.dumpNamedREFHelperType(DmoTypeFormatter.java:589) */ @SuppressWarnings("serial") abstract public class DmcTypeModuleBREF extends DmcTypeNamedObjectREF { public DmcTypeModuleBREF(){ } public DmcTypeModuleBREF(DmcAttributeInfo ai){ super(ai); } @Override protected ModuleBREF getNewHelper(){ return(new ModuleBREF()); } @Override protected DefinitionName getNewName(){ return(new DefinitionName()); } @Override protected String getDMOClassName(){ return( ModuleBDMO.class.getName()); } @Override protected boolean isDMO(Object value){ if (value instanceof ModuleBDMO) return(true); return(false); } @Override protected ModuleBREF typeCheck(Object value) throws DmcValueException { ModuleBREF rc = null; if (value instanceof ModuleBREF) rc = (ModuleBREF)value; else if (value instanceof ModuleBDMO) rc = new ModuleBREF((ModuleBDMO)value); else if (value instanceof DefinitionName) rc = new ModuleBREF((DefinitionName)value); else if (value instanceof String) rc = new ModuleBREF((String)value); else throw(new DmcValueException("Object of class: " + value.getClass().getName() + " passed where object compatible with ModuleBREF, ModuleBDMO or String expected.")); return(rc); } @Override public void serializeValue(DmcOutputStreamIF dos, ModuleBREF value) throws Exception { value.serializeIt(dos); } @Override public ModuleBREF deserializeValue(DmcInputStreamIF dis) throws Exception { ModuleBREF rc = new ModuleBREF(); rc.deserializeIt(dis); return(rc); } @Override public ModuleBREF cloneValue(ModuleBREF value){ return(new ModuleBREF(value)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy