T
- the type of term labels which are returned by this factory.public interface TermLabelFactory<T extends TermLabel>
The method in this factory allow you to retrieve term labels with given parameters. However, a factory may choose to reuse term labels rather than create new objects on every call.
Factories are identified by a name. This name corresponds to the name of the
TermLabel
objects they create. When parsing all queries to a label
will be delegated to the factory with the same name.
Please see information in TermLabels
on how to introduce new label
types.
SingletonLabelFactory
Modifier and Type | Method and Description |
---|---|
T |
parseInstance(java.util.List<java.lang.String> arguments,
TermServices services)
Parses the arguments and produces a term label.
|
T parseInstance(java.util.List<java.lang.String> arguments, TermServices services) throws TermLabelException
An implementation should throw a TermLabelException
if the
arguments cannot be parsed correctly for this type.
arguments
- the arguments for parsing, not null
, no entry
null
services
- a non-null
services object to look up symbols.null
TermLabelException
- if the parameters were illegally formatted