Interface TuriClass
- All Superinterfaces:
ServiceLoaded
Classes implementing this interface and "providing" these classes from the module can implement methods for
Java classes. When there is a method call on a value, which is not
LngObject, the
run-time checks if there is any class implementing this interface registered for the given class (as returned by the
method forClass().
If there is then getMethod(Object, String) will be invoked on that object to get a callable.
To create such a callable see the implementation TuriString
that implements methods callable on normal strings.
-
Method Details
-
getInstances
Retrieves a list of instances of classes that implement theTuriClassinterface. These instances are loaded using the service loader mechanism. If no instances are found through the primary approach, a fallback mechanism attempts to load the classes using theMETA-INF/servicesresources.- Returns:
- a list of instances of classes implementing the
TuriClassinterface
-
forClass
Class<?> forClass()- Returns:
- the class on which works
-
getMethod
- Throws:
ExecutionException
-