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

org.dmd.dms.generated.types.DmcTypeStringNameSTATIC 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) 2012-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.dms.generated.types;

import org.dmd.dmc.DmcValueException;
import org.dmd.dmc.DmcInputStreamIF;
import org.dmd.dmc.DmcOutputStreamIF;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dmc.DmcObjectName;
import org.dmd.dmc.DmcNameBuilderIF;
import org.dmd.dmc.types.DmcTypeDmcObjectName;
import org.dmd.dmc.types.StringName;    // base type import

/**
 * The DmcTypeStringNameSTATIC provides static access to functions used to manage values of type StringName
 * These methods are used to support ComplexTypeDefinitions.
 * 

* This code was auto-generated and shouldn't be altered manually! * Generated from: org.dmd.dms.util.GenUtility.dumpSTATICType(GenUtility.java:2346) * Called from: org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2261) */ public class DmcTypeStringNameSTATIC implements DmcNameBuilderIF { public static DmcTypeStringNameSTATIC instance; static DmcTypeStringNameSV typeHelper; static String nameClass = "StringName"; static final int attrID = 160; static { instance = new DmcTypeStringNameSTATIC(); } protected DmcTypeStringNameSTATIC() { typeHelper = new DmcTypeStringNameSV(); } public StringName typeCheck(Object value) throws DmcValueException { return(typeHelper.typeCheck(value)); } public StringName cloneValue(StringName value) throws DmcValueException { return(typeHelper.cloneValue(value)); } public void serializeValue(DmcOutputStreamIF dos, StringName value) throws Exception { typeHelper.serializeValue(dos, value); } public StringName deserializeValue(DmcInputStreamIF dis) throws Exception { return(typeHelper.deserializeValue(dis)); } @Override public DmcTypeDmcObjectName getNewNameHolder(DmcObjectName name, DmcAttributeInfo ai){ DmcTypeDmcObjectName rc = typeHelper.getNew(ai); try { rc.set(name); } catch (DmcValueException e) { throw(new IllegalStateException("Shouldn't throw exception when setting a name attribute value in a DmcNameBuilderIF - occurred for type: " + name.getNameClass(), e)); } return(rc); } @Override public String getNameClass(){ return(nameClass); } @Override public int getNameAttributeID(){ return(attrID); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy