public class LOADImpl<C extends IComponent<C>> extends Utility<C> implements LOAD
Modifier and Type | Method and Description |
---|---|
Object |
call_function(String function_name,
Object... args)
Invoke an xtUML domain function in the same component which originally
created the instance of
LOAD . |
Object |
create(String key_letters)
Create an xtUML class instance.
|
void |
load(String java_class,
String[] args)
Create a new loader with a given set of arguments and kick off the
loading process.
|
void |
relate_using(Object inst1,
Object inst2,
Object link,
int rel_num,
String phrase)
Relate three xtUML instances together across the given associative
relationship.
|
void |
relate(Object inst1,
Object inst2,
int rel_num,
String phrase)
Relate two xtUML instances together across the given relationship.
|
void |
set_attribute(Object instance,
String attribute_name,
Object value)
Set the value of an attribute on an instance of an xtUML class.
|
context, getRunContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
warn
public LOADImpl(C context)
public Object call_function(String function_name, Object... args) throws XtumlException
LOAD
LOAD
.call_function
in interface LOAD
function_name
- The name of the domain function to invokeargs
- The argument list in modeled ordernull
for
functions with void return typeXtumlException
- if the a domain function could not be found with
the given names, or if the number of arguments or types of arguments
mismatchpublic Object create(String key_letters) throws XtumlException
LOAD
create
in interface LOAD
key_letters
- the key letters of the xtUML classXtumlException
- if no class with matching key letters can be found
in the componentpublic void load(String java_class, String[] args) throws XtumlException
LOAD
java_class
parameter is created. The specified class is expected
to implement the IGenericLoader
interface. Once created, the load
method of the loader will be
invoked, passing args
and an instance of the LOAD
class
to link call back in to the instance population.load
in interface LOAD
java_class
- the fully qualified class name of the loader class to
createargs
- the list of arguments to pass to the loader classXtumlException
- if the class specified by java_class
cannot be loaded or if it does not implement the IGenericLoader
interfaceIGenericLoader
public void relate(Object inst1, Object inst2, int rel_num, String phrase) throws XtumlException
LOAD
inst1
and inst2
are
interchangeable and the value of phrase
has no effect. It may be
null
. For reflexive relationships, inst1
and inst2
will "read across" according to the value of phrase
with the same
semantics as OAL.relate
in interface LOAD
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
relationshipsXtumlException
- if the relationship specified does not exist
between inst1 and inst2 or if the act of relating the instances results in
a model integrity violationpublic void relate_using(Object inst1, Object inst2, Object link, int rel_num, String phrase) throws XtumlException
LOAD
inst1
and inst2
are interchangeable and the value of phrase
has no effect.
It may be null
. For reflexive relationships, inst1
and
inst2
will "read across" according to the value of phrase
with the same semantics as OAL.relate_using
in interface LOAD
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
relationshipsXtumlException
- if the relationship specified does not exist
between inst1 and inst2 or if the act of relating the instances results in
a model integrity violationpublic void set_attribute(Object instance, String attribute_name, Object value) throws XtumlException
LOAD
set_attribute
in interface LOAD
instance
- the model class instanceattribute_name
- the name of the attribute to setvalue
- the value to assign to the specified attributeXtumlException
- if the specified attribute does not exist on the
class or if the type of the passed value is not compatible with the
attribute typeCopyright © 2020. All rights reserved.