@External public abstract class API extends java.lang.Object
Represents: no model element, can only be used from outside the model
Usage:
Cannot be used in a model, call its static methods from any outside code (it is always thread-safe).
See the documentation of Model
for an overview on modeling in
JtxtUML.
Constructor and Description |
---|
API() |
Modifier and Type | Method and Description |
---|---|
static <E> Any<E> |
collect(E... elements)
Collects the given elements to a new txtUML API collection.
|
static <E,C extends GeneralCollection<E>,C2 extends GeneralCollection<?>> |
collectIn(java.lang.Class<C2> collectionType,
E... elements)
Collects the given elements to a new txtUML API collection of the given
type.
|
static void |
log(java.lang.String message)
Logs a message.
|
static void |
logError(java.lang.String message)
Logs an error message.
|
static void |
send(Signal signal,
ModelClass target)
Asynchronously sends the specified signal to the specified target object.
|
public static void send(Signal signal, ModelClass target)
Does not check whether the target object is deleted, it is only checked when the signal arrives to the object.
Use Action.send(Signal, ModelClass)
instead of this method from
inside the model.
signal
- the signal object to sendtarget
- the model object which will receive the signaljava.lang.NullPointerException
- if target
is null
public static void log(java.lang.String message)
Use Action.log(String)
instead of this method from inside the
model.
message
- the message to be loggedpublic static void logError(java.lang.String message)
Use Action.logError(String)
instead of this method from inside
the model.
message
- the error message to be logged@SafeVarargs public static <E> Any<E> collect(E... elements)
Any
.
Use Action.collect(Object...)
instead of this method from inside
the model.
elements
- the elements to collect@SafeVarargs public static <E,C extends GeneralCollection<E>,C2 extends GeneralCollection<?>> C collectIn(java.lang.Class<C2> collectionType, E... elements)
Use Action.collectIn(Class, Object...)
instead of this method
from inside the model.
collectionType
- the type of the collection to create; must be a txtUML API
collectionelements
- the elements to collect