org.dmd.dmg.generated.types.adapters.MethodGeneratorREFMVAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dark-matter-data Show documentation
Show all versions of dark-matter-data Show documentation
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.
package org.dmd.dmg.generated.types.adapters;
import org.dmd.dmc.presentation.DmcAdapterIF;
import org.dmd.dmc.DmcAttribute;
import org.dmd.dmc.DmcAttributeInfo;
import org.dmd.dms.generated.types.DmcTypeModifierMV;
import org.dmd.dmg.generated.types.DmcTypeMethodGeneratorREFMV;
@SuppressWarnings("serial")
// org.dmd.dms.util.AdapterFormatter.dumpAdapter(AdapterFormatter.java:59)
// Called from: org.dmd.dms.util.AdapterFormatter.dumpAdapterMV(AdapterFormatter.java:16)
public class MethodGeneratorREFMVAdapter extends DmcTypeMethodGeneratorREFMV implements DmcAdapterIF {
transient DmcTypeMethodGeneratorREFMV existingValue;
public MethodGeneratorREFMVAdapter(DmcAttributeInfo ai){
super(ai);
}
public void setEmpty(){
value = null;
}
public boolean hasValue(){
if (value == null)
return(false);
return(true);
}
public void resetToExisting() {
if (existingValue == null)
value = null;
else
value = existingValue.getMVCopy();
}
public void setExisting(DmcAttribute attr) {
existingValue = (DmcTypeMethodGeneratorREFMV) attr;
if (existingValue != null)
value = existingValue.getMVCopy();
}
public boolean valueChanged(){
return(valueChangedMV(existingValue, this));
}
public void addMods(DmcTypeModifierMV mods){
addModsMV(mods, existingValue, this);
}
public DmcAttribute getExisting() {
return(existingValue);
}
public Object getValue() {
return(value);
}
}