org.eclipse.equinox.bidi.advanced
public final class STextExpertFactory extends Object
ISTextExpert instance (called in short an "expert") provides
the advanced methods to process a certain type of structured text, and
is thus related to a specific
structured text type handler.
There are two kinds of experts:
getStatefulExpert(java.lang.String).getExpert().Only the stateful kind can remember the state established by a call to a text processing method and transmit it as initial state in the next call to a text processing method.
In other words, the methods
ISTextExpert.getState(),
ISTextExpert.setState(java.lang.Object) and
ISTextExpert.clearState() of
ISTextExpert are inoperative for experts which are not stateful.
Using a stateful expert is more resource intensive, thus not stateful experts should be used when feasible.
| Modifier and Type | Method and Description |
|---|---|
static ISTextExpert |
getExpert()
Obtains a ISTextExpert instance for processing structured text with
a default type handler segmenting the text according to default separators.
|
static ISTextExpert |
getExpert(String type)
Obtains a ISTextExpert instance for processing structured text with
the specified type handler.
|
static ISTextExpert |
getExpert(String type,
STextEnvironment environment)
Obtains a ISTextExpert instance for processing structured text with
the specified type handler and the specified environment.
|
static ISTextExpert |
getStatefulExpert(STextTypeHandler handler,
STextEnvironment environment)
Obtains a ISTextExpert instance for processing structured text with
the specified type handler and the specified environment.
|
static ISTextExpert |
getStatefulExpert(String type)
Obtains a ISTextExpert instance for processing structured text with
the specified type handler.
|
static ISTextExpert |
getStatefulExpert(String type,
STextEnvironment environment)
Obtains a ISTextExpert instance for processing structured text with
the specified type handler and the specified environment.
|
public static ISTextExpert getExpert()
STextProcessor.getDefaultSeparators()public static ISTextExpert getExpert(String type)
type - the identifier for the required type handler. This identifier
may be one of those listed in STextTypeHandlerFactory
or it may be have been registered by a plug-in.IllegalArgumentException - if type is not a known type
identifier.public static ISTextExpert getExpert(String type, STextEnvironment environment)
type - the identifier for the required type handler. This identifier
may be one of those listed in STextTypeHandlerFactory
or it may be have been registered by a plug-in.environment - the current environment, which may affect the behavior of
the expert. This parameter may be specified as
null, in which case the
STextEnvironment.DEFAULT
environment should be assumed.IllegalArgumentException - if type is not a known type
identifier.public static ISTextExpert getStatefulExpert(String type)
type - the identifier for the required type handler. This identifier
may be one of those listed in STextTypeHandlerFactory
or it may be have been registered by a plug-in.IllegalArgumentException - if type is not a known type
identifier.public static ISTextExpert getStatefulExpert(String type, STextEnvironment environment)
type - the identifier for the required type handler. This identifier
may be one of those listed in STextTypeHandlerFactory
or it may be have been registered by a plug-in.environment - the current environment, which may affect the behavior of
the expert. This parameter may be specified as
null, in which case the
STextEnvironment.DEFAULT
environment should be assumed.IllegalArgumentException - if type is not a known type
identifier.public static ISTextExpert getStatefulExpert(STextTypeHandler handler, STextEnvironment environment)
handler - the type handler instance. It may have been obtained using
STextTypeHandlerFactory.getHandler(String) or
by instantiating a type handler.environment - the current environment, which may affect the behavior of
the expert. This parameter may be specified as
null, in which case the
STextEnvironment.DEFAULT
environment should be assumed.IllegalArgumentException - if type is not a known type
identifier.Guidelines for using Eclipse APIs. Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.