Class LOADImpl<C extends IComponent<C>>
- java.lang.Object
-
- io.ciera.runtime.summit.util.Utility<C>
-
- io.ciera.runtime.instanceloading.generic.util.impl.LOADImpl<C>
-
- All Implemented Interfaces:
LOAD,IActionHome<C>
public class LOADImpl<C extends IComponent<C>> extends Utility<C> implements LOAD
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcall_function(String function_name, Object... args)Invoke an xtUML domain function in the same component which originally created the instance ofLOAD.Objectcreate(String key_letters)Create an xtUML class instance.voidload(String java_class, String[] args)Create a new loader with a given set of arguments and kick off the loading process.voidrelate(Object inst1, Object inst2, int rel_num, String phrase)Relate two xtUML instances together across the given relationship.voidrelate_using(Object inst1, Object inst2, Object link, int rel_num, String phrase)Relate three xtUML instances together across the given associative relationship.voidset_attribute(Object instance, String attribute_name, Object value)Set the value of an attribute on an instance of an xtUML class.-
Methods inherited from class io.ciera.runtime.summit.util.Utility
context, getRunContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.ciera.runtime.summit.application.IActionHome
warn
-
-
-
-
Constructor Detail
-
LOADImpl
public LOADImpl(C context)
-
-
Method Detail
-
call_function
public Object call_function(String function_name, Object... args) throws XtumlException
Description copied from interface:LOADInvoke an xtUML domain function in the same component which originally created the instance ofLOAD.- Specified by:
call_functionin interfaceLOAD- Parameters:
function_name- The name of the domain function to invokeargs- The argument list in modeled order- Returns:
- The result of the function invocation or
nullfor functions with void return type - Throws:
XtumlException- if the a domain function could not be found with the given names, or if the number of arguments or types of arguments mismatch
-
create
public Object create(String key_letters) throws XtumlException
Description copied from interface:LOADCreate an xtUML class instance.- Specified by:
createin interfaceLOAD- Parameters:
key_letters- the key letters of the xtUML class- Returns:
- an instance handle to the newly created class instance
- Throws:
XtumlException- if no class with matching key letters can be found in the component
-
load
public void load(String java_class, String[] args) throws XtumlException
Description copied from interface:LOADCreate a new loader with a given set of arguments and kick off the loading process. An instance of the class specified by thejava_classparameter is created. The specified class is expected to implement theIGenericLoaderinterface. Once created, theloadmethod of the loader will be invoked, passingargsand an instance of theLOADclass to link call back in to the instance population.- Specified by:
loadin interfaceLOAD- Parameters:
java_class- the fully qualified class name of the loader class to createargs- the list of arguments to pass to the loader class- Throws:
XtumlException- if the class specified byjava_classcannot be loaded or if it does not implement theIGenericLoaderinterface- See Also:
IGenericLoader
-
relate
public void relate(Object inst1, Object inst2, int rel_num, String phrase) throws XtumlException
Description copied from interface:LOADRelate two xtUML instances together across the given relationship. For non-reflexive relationships,inst1andinst2are interchangeable and the value ofphrasehas no effect. It may benull. For reflexive relationships,inst1andinst2will "read across" according to the value ofphrasewith the same semantics as OAL.- Specified by:
relatein interfaceLOAD- Parameters:
inst1- the first instance to relateinst2- the second instance to relaterel_num- the relationship number to createphrase- the text phrase used to disambiguate relates of reflexive relationships- Throws:
XtumlException- if the relationship specified does not exist between inst1 and inst2 or if the act of relating the instances results in a model integrity violation
-
relate_using
public void relate_using(Object inst1, Object inst2, Object link, int rel_num, String phrase) throws XtumlException
Description copied from interface:LOADRelate three xtUML instances together across the given associative relationship. For non-reflexive relationships,inst1andinst2are interchangeable and the value ofphrasehas no effect. It may benull. For reflexive relationships,inst1andinst2will "read across" according to the value ofphrasewith the same semantics as OAL.- Specified by:
relate_usingin interfaceLOAD- Parameters:
inst1- the first instance to relateinst2- the second instance to relatelink- the associative instance to relaterel_num- the relationship number to createphrase- the text phrase used to disambiguate relates of reflexive relationships- Throws:
XtumlException- if the relationship specified does not exist between inst1 and inst2 or if the act of relating the instances results in a model integrity violation
-
set_attribute
public void set_attribute(Object instance, String attribute_name, Object value) throws XtumlException
Description copied from interface:LOADSet the value of an attribute on an instance of an xtUML class.- Specified by:
set_attributein interfaceLOAD- Parameters:
instance- the model class instanceattribute_name- the name of the attribute to setvalue- the value to assign to the specified attribute- Throws:
XtumlException- if the specified attribute does not exist on the class or if the type of the passed value is not compatible with the attribute type
-
-