- All Known Subinterfaces:
ONLauncherProvider
public interface ONLauncherData
SPI (Service Provider Interface) for object-namer launcher
initialization data.
Some packages can provide additional data for an object namer
but do not contain an object namer itself. This interface
provides the SPI for this additional data, which must be a
YAML file describing the configuration. This SPI provides
a name used to look up the service provider, an input stream
to read the corresponding YAML file (which must be UTF-8 encoded),
and a tab spacing to use if tabs appear in the input file.
The BZDev class library names each service provider by using the last component of the service provider's module name. These names are
- desktop - to allow the use of the class
AnimatedPanelGraphics
. - math - to provide additional constants and functions
- p3d - to provide classes that allow animations of 3D models to be shown.
getInputStream()
, which returns an input
stream containing UTF-8 encoded character data providing a YAML 1.2
document whose top-level object contains the following properties,
the values of which are lists:
- argumentTypes - a
JSArray
providing a list of strings giving the fully qualified class names for arguments used by constructors, functions, and methods. The types String, int, double, Integer, or Double should not be used, as these are allowed by default. - fieldClasses - a
JSArray
providing a list of strings giving the fully qualified class names for classes containing fields that can be used. The types of the fields that will be included are boolean, int, long, double,String
, or an enumeration. - functionClasses - a
JSArray
providing a list of strings the fully qualified class names for classes whose public, static methods returning an allowable type have a fixed number of arguments whose types are boolean, int, long, double, or a type provided by the argumentTypes property. - methodClasses - a
JSArray
providing a list of strings giving the fully qualified class names classes whose instance methods returning an allowable type have a fixed number of arguments with types int, double, long, boolean,String
, or a type provided by the argumentTypes property. - returnTypes - a
JSArray
providing a list of strings giving the fully qualified class names for objects that the parser can return or can construct. The constructors that will be provided are those with a fixed number of arguments whose types are int, long, double, boolean,String
, or a type provided by the argumentTypes property.
-
Method Summary
Modifier and TypeMethodDescriptionReturn a description of this service provider.Get an input stream containing YAML-formatted initialization data for an object-namer launcher.default String
Get the module name for the module containing this launcher.getName()
Get the name for this provider.default int
Get the tab spacing for the data stream.
-
Method Details
-
getName
String getName()Get the name for this provider.- Returns:
- the name
-
getModuleName
Get the module name for the module containing this launcher.- Returns:
- the module name
-
getInputStream
InputStream getInputStream()Get an input stream containing YAML-formatted initialization data for an object-namer launcher.- Returns:
- the input stream;
-
getTabSpacing
default int getTabSpacing()Get the tab spacing for the data stream.- Returns:
- the tab spacing (0 if there are no tabs)
-
description
String description()Return a description of this service provider. The description should be short enough that it , the value ofgetName()
, and a few additional characters (e.g., " - ") would fit on a single line.- Returns:
- the description
-